Function actix_web_actors::ws::handshake_with_protocols
source ยท pub fn handshake_with_protocols(
req: &HttpRequest,
protocols: &[&str]
) -> Result<HttpResponseBuilder, HandshakeError>Expand description
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.