socksx::util

Function try_read_initial_data

Source
pub async fn try_read_initial_data(
    stream: &mut TcpStream,
) -> Result<Option<Vec<u8>>>
Expand description

Attempts to read the initial data from a TCP stream.

§Parameters

  • stream: A mutable reference to a TcpStream.

§Returns

Returns a Result containing an Option with the read data as a Vec<u8> or an error.