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]
S: Stream,
type Stream = S
The type of stream this upgrade process is working with (TcpStream, etc.)
type Error = (S, Request, HyperIntoWsError)
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
fn into_ws(self) -> Result<Upgrade<Self::Stream>, Self::Error>
[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