pub async fn client_async_tls<R, S>(
    request: R,
    stream: S,
) -> Result<(WebSocketStream<AutoStream<S>>, Response), Error>
where
    R: IntoClientRequest + Unpin,
    S: 'static + AsyncRead + AsyncWrite + Send + Unpin,
    AutoStream<S>: Unpin,
{
    let request = request.into_client_request()?;

    // Set to None to disable SSL validation
    // let domain = domain(&request)?;
    let domain = None;

    // Make sure we check domain and mode first. URL must be valid.
    let mode = uri_mode(&request.uri())?;

    let stream = wrap_stream(stream, domain, mode).await?;
    client_async(request, stream).await
}
/// Creates a WebSocket handshake from a request and a stream,
/// upgrading the stream to TLS if required.
Creates a WebSocket handshake from a request and a stream,
upgrading the stream to TLS if required.
Creates a WebSocket handshake from a request and a stream upgrading the stream to TLS if required .
pub async fn client_async_tls<R, S>(
    request: R,
    stream: S,
) -> Result<(WebSocketStream<AutoStream<S>>, Response), Error>
where
    R: IntoClientRequest + Unpin,
    S: 'static + AsyncRead + AsyncWrite + Send + Unpin,
    AutoStream<S>: Unpin,
{
    let request = request.into_client_request()?;
    // Set to None to disable SSL validation
    // let domain = domain(&request)?;
    let domain = None;
    // Make sure we check domain and mode first. URL must be valid.
    let mode = uri_mode(&request.uri())?;
    let stream = wrap_stream(stream, domain, mode).await?;
    client_async(request, stream).await
}
pub async fn client_async_tls < R , S > ( request : R , stream : S , ) -> Result < ( WebSocketStream < AutoStream < S > > , Response ) , Error > where R : IntoClientRequest + Unpin , S : ' static + AsyncRead + AsyncWrite + Send + Unpin , AutoStream < S > : Unpin , { let request = request . into_client_request ( ) ? ; // Set to None to disable SSL validation // let domain = domain(&request)?; let domain = None ; // Make sure we check domain and mode first. URL must be valid. let mode = uri_mode ( & request . uri ( ) ) ? ; let stream = wrap_stream ( stream , domain , mode ) . await ? ; client_async ( request , stream ) . await }
Creates a WebSocket handshake from a request and a stream,
upgrading the stream to TLS if required.
Creates a WebSocket handshake from a request and a stream upgrading the stream to TLS if required .
request
R
stream
S