handshake

Function handshake 

pub async fn handshake<T, B>(
    io: T,
) -> Result<(SendRequest<B>, Connection<T, B>), Error>
where T: AsyncRead + AsyncWrite + Unpin + ExtensionsMut, B: Body + Send + 'static + Unpin, <B as Body>::Data: Send + 'static, <B as Body>::Error: Into<Box<dyn Error + Send + Sync>>,
Available on crate features http and http-full only.
Expand description

Returns a handshake future over some IO.

This is a shortcut for Builder::new().handshake(io). See client::conn for more.