Function tungstenite::client::client [] [src]

pub fn client<'t, Stream, Req>(
    request: Req,
    stream: Stream
) -> StdResult<WebSocket<Stream>, HandshakeError<Stream, ClientHandshake>> where
    Stream: Read + Write,
    Req: Into<Request<'t>>, 

Do the client handshake over the given stream.

Use this function if you need a nonblocking handshake support or if you want to use a custom stream like mio::tcp::TcpStream or openssl::ssl::SslStream. Any stream supporting Read + Write will do.