Skip to main content

handshake_h2

Function handshake_h2 

Source
pub fn handshake_h2(
    method: &Method,
    headers: &HeaderMap,
) -> Result<Builder, HandshakeError>
Expand description

Verify HTTP/2 WebSocket handshake request and create handshake response.

§Protocol validation

This function does not verify the :protocol pseudo-header. Per RFC 8441, the caller must ensure the request’s :protocol is "websocket" before calling this function. Typically the HTTP/2 transport layer exposes the parsed pseudo-header; the caller should check it and only proceed to this handshake when the value matches.