handshake, false and an error if not.
websocketClientVerifyHandshake
fn
bool websocketClientVerifyHandshake(soup.message.Message msg, gobject.type_class.TypeClass[] supportedExtensions, out soup.websocket_extension.WebsocketExtension[] acceptedExtensions)Looks at the response status code and headers in msg and determines if they contain a valid WebSocket handshake response (given the handshake request in msg's request headers).
If supported_extensions is non-null, extensions included in the response "Sec-WebSocket-Extensions" are verified too. Accepted extensions are returned in accepted_extensions parameter if non-null.
This is a low-level function; if you use [soup.session.Session.websocketConnectAsync] to create a WebSocket connection, it will call this for you.
Parameters
msg | #SoupMessage containing both client and server sides of a WebSocket handshake |
supportedExtensions | list of supported extension types |
acceptedExtensions | a #GList of #SoupWebsocketExtension objects |
Returns
true if msg contains a completed valid WebSocket
Throws
[ErrorWrap]