Function

Soupwebsocket_client_prepare_handshake

Declaration [src]

void
soup_websocket_client_prepare_handshake (
  SoupMessage* msg,
  const char* origin,
  char** protocols,
  GPtrArray* supported_extensions
)

Description [src]

Adds the necessary headers to msg to request a WebSocket handshake including supported WebSocket extensions.

The message body and non-WebSocket-related headers are not modified.

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.

Parameters

msg SoupMessage
 

A SoupMessage.

 The data is owned by the caller of the function.
origin const char*
 

The “Origin” header to set.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
protocols An array of char*
 

List of protocols to offer.

 The argument can be NULL.
 The array must be NULL-terminated.
 The data is owned by the caller of the function.
 Each element is a NUL terminated UTF-8 string.
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.