is_upgrade_accepted

Function is_upgrade_accepted 

Source
pub fn is_upgrade_accepted<'a, H>(
    code: u16,
    response_headers: H,
    nonce: &[u8; 16],
    buf: &'a mut [u8; 33],
) -> bool
where H: IntoIterator<Item = (&'a str, &'a str)>,
Expand description

Check if the response is a Websocket upgrade response and if the upgrade was accepted

Parameters:

  • code: The status response code
  • response_headers: The response headers
  • nonce: The nonce used for the Sec-WebSocket-Key header in the WS upgrade request
  • buf: A buffer to use when performing the check