Skip to main content

read_async

Function read_async 

Source
pub async fn read_async<S>(stream: &mut S) -> Result<Option<SocketAddr>, Error>
where S: AsyncRead + Unpin,
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.