Function
Soupwebsocket_client_verify_handshake
since: 3.0
Declaration [src]
gboolean
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 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_websocket_connect_async() to create a WebSocket
connection, it will call this for you.
Available since: 3.0
Parameters
msg-
Type:
SoupMessageSoupMessagecontaining both client and server sides of a WebSocket handshake.The data is owned by the caller of the function. supported_extensions-
Type: An array of
NoneList of supported extension types.
The argument can be NULL.The data is owned by the caller of the function. accepted_extensions-
Type: A list of
NoneA
GListofSoupWebsocketExtensionobjects.The argument will be set by the function. The argument can be NULL.The caller of the function takes ownership of the data, and is responsible for freeing it. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the function if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.