WebsocketExtension.processOutgoingMessage

Process a message before it's sent. If the payload isn't changed the given @payload is just returned, otherwise g_bytes_unref() is called on the given @payload and a new #GBytes is returned with the new data.

Extensions using reserved bits of the header will change them in @header.

class WebsocketExtension
Bytes
processOutgoingMessage
(
ref ubyte header
,
Bytes payload
)

Parameters

header ubyte

the message header

payload Bytes

the payload data

Return Value

Type: Bytes

the message payload data, or %NULL in case of error

Throws

GException on failure.

Meta

Since

2.68