Virtual Method
SoupWebsocketExtensionprocess_incoming_message_with_limit
unstable since: 3.8
Declaration [src]
GBytes*
process_incoming_message_with_limit (
SoupWebsocketExtension* extension,
guint8* header,
GBytes* payload,
guint64 max_output_size,
GError** error
)
Description [src]
Process a message after it’s received, without producing more than
max_output_size bytes of output.
This behaves like soup_websocket_extension_process_incoming_message(),
but extensions that expand their input (such as permessage-deflate)
stop and return an error with WebsocketError.CLOSE_TOO_BIG
instead of producing output larger than max_output_size. Extensions
that don’t implement this fall back to
soup_websocket_extension_process_incoming_message().
Available since: 3.8
Parameters
header-
Type:
guint8*The message header.
The argument will be modified by the function. payload-
Type:
GBytesThe payload data.
The instance takes ownership of the data, and is responsible for freeing it. max_output_size-
Type:
guint64The maximum size in bytes of the processed payload.
error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the virtual function if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GBytes
The message payload data, or NULL in case of error.
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |