Struct evzht9h3nznqzwl::server::upgrade::sync::RequestStreamPair [] [src]

pub struct RequestStreamPair<S: Stream>(pub S, pub Request);

If you have your requests separate from your stream you can use this struct to upgrade the connection based on the request given (the request should be a handshake).

Trait Implementations

impl<S> IntoWs for RequestStreamPair<S> where
    S: Stream
[src]

The type of stream this upgrade process is working with (TcpStream, etc.)

An error value in case the stream is not asking for a websocket connection or something went wrong. It is common to also include the stream here. Read more

[src]

Attempt to parse the start of a Websocket handshake, later with the returned WsUpgrade struct, call accept to start a websocket client, and reject to send a handshake rejection response. Read more