WebsocketExtension.processOutgoingMessage

Process a message before it's sent.

If the payload isn't changed the given payload is just returned, otherwise methodGlib.Bytes.unref is called on the given payload and a new glib.bytes.Bytes is returned with the new data.

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

class WebsocketExtension
processOutgoingMessage

Parameters

header ubyte

the message header

payload glib.bytes.Bytes

the payload data

Return Value

Type: glib.bytes.Bytes

the message payload data, or null in case of error