Function hyper_tungstenite::upgrade_requested[][src]

pub fn upgrade_requested<B>(request: &Request<B>) -> bool

Check if a request is a websocket upgrade request.

If the Upgrade header lists multiple protocols, this function returns true if of them are "websocket", If the server supports multiple upgrade protocols, it would be more appropriate to try each listed protocol in order.