Declaration [src]

soup_websocket_client_verify_handshake (
  SoupMessage* msg,
  GPtrArray* supported_extensions,
  GList** accepted_extensions,
  GError** error

Description [src]

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 msgs 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_websocket_connect_async() to create a WebSocket connection, it will call this for you.


msg SoupMessage

SoupMessage containing both client and server sides of a WebSocket handshake.

 The data is owned by the caller of the function.
supported_extensions An array of None

List of supported extension types.

 The argument can be NULL.
 The data is owned by the caller of the function.
accepted_extensions A list of None

A GList of SoupWebsocketExtension objects.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean

TRUE if msg contains a completed valid WebSocket handshake, FALSE and an error if not.