WebsocketExtension.processOutgoingMessage
glib.bytes.Bytes processOutgoingMessage(ref ubyte header, glib.bytes.Bytes payload)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.
Parameters
header | the message header |
payload | the payload data |
Returns
the message payload data, or null in case of error
Throws
[ErrorWrap]