websocket_client_prepare_handshake


Description:


[ Version ( since = "2.50" ) ]
public void websocket_client_prepare_handshake (Message msg, string? origin, string[]? protocols)

Adds the necessary headers to msg to request a WebSocket handshake.

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

Use websocket_client_prepare_handshake_with_extensions if you want to include "Sec-WebSocket-Extensions" header in the request.

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

a Message

origin

the "Origin" header to set

protocols

list of protocols to offer


Namespace: Soup
Package: libsoup-2.4