[−][src]Function scrappy_web_actors::ws::handshake_with_protocols
pub fn handshake_with_protocols(
req: &HttpRequest,
protocols: &[&str]
) -> Result<HttpResponseBuilder, HandshakeError>
Prepare WebSocket
handshake response.
This function returns handshake HttpResponse
, ready to send to peer.
It does not perform any IO.
protocols
is a sequence of known protocols. On successful handshake,
the returned response headers contain the first protocol in this list
which the server also knows.