Function tokio_tungstenite::client_async
[−]
[src]
pub fn client_async<S: AsyncRead + AsyncWrite>(url: Url,
stream: S)
-> ConnectAsync<S>
Create a handshake provided stream and assuming the provided request.
This function will internally call client::client
to create a
handshake representation and returns a future representing the
resolution of the WebSocket handshake. The returned future will resolve
to either WebSocketStream<S>
or Error
depending if it's successful
or not.
This is typically used for clients who have already established, for example, a TCP connection to the remove server.