websocket_client_verify_handshake_with_extensions


Description:


[ Version ( since = "2.68" ) ]
public bool websocket_client_verify_handshake_with_extensions (Message msg, GenericArray<TypeClass>? supported_extensions, out List<WebsocketExtension> accepted_extensions) throws Error

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

Parameters:

msg

Message containing both client and server sides of a WebSocket handshake

supported_extensions

list of supported extension types

accepted_extensions

a List of WebsocketExtension objects

Returns:

true if msg contains a completed valid WebSocket handshake, false and an error if not.


Namespace: Soup
Package: libsoup-2.4