Skip to main content

drive_stream

Function drive_stream 

Source
pub async fn drive_stream<H, T>(
    handshake: H,
    io: &mut T,
) -> Result<Established<H::Output>, DriveError<H::Error>>
where H: Handshake, T: AsyncRead + AsyncWrite + Unpin,
Expand description

drive_stream over a tokio stream.

ยงErrors

DriveError when the stream fails or closes, or the handshake refuses the peer.