Skip to main content

read_async

Function read_async 

Source
pub async fn read_async<S: AsyncRead + Unpin>(
    stream: &mut S,
) -> Result<Option<SocketAddr>>
Expand description

Read and parse the header at the start of stream (async builds). Ok(None): a valid header without an address; keep the peer’s.