Soup.WebsocketExtension¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Soup.WebsocketExtension(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- configure(connection_type, params)¶
- Parameters:
connection_type (
Soup.WebsocketConnectionType
) – eitherSoup.WebsocketConnectionType.CLIENT
orSoup.WebsocketConnectionType.SERVER
- Raises:
- Returns:
True
if extension could be configured with the given parameters, orFalse
otherwise- Return type:
Configures self with the given params
- get_request_params()¶
-
Get the parameters strings to be included in the request header. If the extension doesn’t include any parameter in the request, this function returns
None
.New in version 2.68.
- get_response_params()¶
-
Get the parameters strings to be included in the response header. If the extension doesn’t include any parameter in the response, this function returns
None
.New in version 2.68.
- process_incoming_message(header, payload)¶
- Parameters:
header (
int
) – the message headerpayload (
GLib.Bytes
) – the payload data
- Raises:
- Returns:
the message payload data, or
None
in case of error- header:
the message header
- Return type:
(
GLib.Bytes
, header:int
)
Process a message after it’s received. If the payload isn’t changed the given payload is just returned, otherwise
GLib.Bytes.unref
() is called on the given payload and a newGLib.Bytes
is returned with the new data.Extensions using reserved bits of the header will reset them in header.
New in version 2.68.
- process_outgoing_message(header, payload)¶
- Parameters:
header (
int
) – the message headerpayload (
GLib.Bytes
) – the payload data
- Raises:
- Returns:
the message payload data, or
None
in case of error- header:
the message header
- Return type:
(
GLib.Bytes
, header:int
)
Process a message before it’s sent. If the payload isn’t changed the given payload is just returned, otherwise
GLib.Bytes.unref
() is called on the given payload and a newGLib.Bytes
is returned with the new data.Extensions using reserved bits of the header will change them in header.
New in version 2.68.
- do_configure(connection_type, params) virtual¶
- Parameters:
connection_type (
Soup.WebsocketConnectionType
) – eitherSoup.WebsocketConnectionType.CLIENT
orSoup.WebsocketConnectionType.SERVER
- Returns:
True
if extension could be configured with the given parameters, orFalse
otherwise- Return type:
Configures extension with the given params
- do_get_request_params() virtual¶
-
Get the parameters strings to be included in the request header. If the extension doesn’t include any parameter in the request, this function returns
None
.New in version 2.68.
- do_get_response_params() virtual¶
-
Get the parameters strings to be included in the response header. If the extension doesn’t include any parameter in the response, this function returns
None
.New in version 2.68.
- do_process_incoming_message(header, payload) virtual¶
- Parameters:
header (
int
) – the message headerpayload (
GLib.Bytes
) – the payload data
- Returns:
the message payload data, or
None
in case of error- header:
the message header
- Return type:
(
GLib.Bytes
, header:int
)
Process a message after it’s received. If the payload isn’t changed the given payload is just returned, otherwise
GLib.Bytes.unref
() is called on the given payload and a newGLib.Bytes
is returned with the new data.Extensions using reserved bits of the header will reset them in header.
New in version 2.68.
- do_process_outgoing_message(header, payload) virtual¶
- Parameters:
header (
int
) – the message headerpayload (
GLib.Bytes
) – the payload data
- Returns:
the message payload data, or
None
in case of error- header:
the message header
- Return type:
(
GLib.Bytes
, header:int
)
Process a message before it’s sent. If the payload isn’t changed the given payload is just returned, otherwise
GLib.Bytes.unref
() is called on the given payload and a newGLib.Bytes
is returned with the new data.Extensions using reserved bits of the header will change them in header.
New in version 2.68.