websocketClientPrepareHandshake

fnvoid websocketClientPrepareHandshake(soup.message.Message msg, string origin = null, string[] protocols = null, gobject.type_class.TypeClass[] supportedExtensions = null)

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

Parameters

msga #SoupMessage
originthe "Origin" header to set
protocolslist of protocols to offer
supportedExtensionslist of supported extension types