### Class

# Soup WebsocketExtension

since: 3.0

#### Description [src]

    abstract class Soup.WebsocketExtension : GObject.Object
    {
      /* No available fields */
    }

A WebSocket extension

`SoupWebsocketExtension` is the base class for WebSocket extension objects.

Available since: 3.0

#### Ancestors

- GObject

#### Descendants

- SoupWebsocketExtensionDeflate

#### Instance methods

###### soup_websocket_extension_configure

Configures `extension` with the given `params`.

since: 3.0

###### soup_websocket_extension_get_request_params

Get the parameters strings to be included in the request header.

since: 3.0

###### soup_websocket_extension_get_response_params

Get the parameters strings to be included in the response header.

since: 3.0

###### soup_websocket_extension_process_incoming_message

Process a message after it’s received.

since: 3.0

###### soup_websocket_extension_process_outgoing_message

Process a message before it’s sent.

since: 3.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

#### Class structure

    struct SoupWebsocketExtensionClass {
      GObjectClass parent_class;
      const char* name;
      gboolean (* configure) (
        SoupWebsocketExtension* extension,
        SoupWebsocketConnectionType connection_type,
        GHashTable* params,
        GError** error
      );
      char* (* get_request_params) (
        SoupWebsocketExtension* extension
      );
      char* (* get_response_params) (
        SoupWebsocketExtension* extension
      );
      GBytes* (* process_outgoing_message) (
        SoupWebsocketExtension* extension,
        guint8* header,
        GBytes* payload,
        GError** error
      );
      GBytes* (* process_incoming_message) (
        SoupWebsocketExtension* extension,
        guint8* header,
        GBytes* payload,
        GError** error
      );

    }

The class structure for the `SoupWebsocketExtension`.

###### Class members

`parent_class: GObjectClass`

  The parent class.

`name: const char*`

  The name of the extension.

`configure: gboolean (* configure) ( SoupWebsocketExtension* extension, SoupWebsocketConnectionType connection_type, GHashTable* params, GError** error )`

  Called to configure the extension with the given parameters.

`get_request_params: char* (* get_request_params) ( SoupWebsocketExtension* extension )`

  Called by the client to build the request header. It should include the parameters string starting with ‘;’

`get_response_params: char* (* get_response_params) ( SoupWebsocketExtension* extension )`

  Called by the server to build the response header. It should include the parameters string starting with ‘;’

`process_outgoing_message: GBytes* (* process_outgoing_message) ( SoupWebsocketExtension* extension, guint8* header, GBytes* payload, GError** error )`

  Called to process the payload data of a message before it’s sent. Reserved bits of the header should be changed.

`process_incoming_message: GBytes* (* process_incoming_message) ( SoupWebsocketExtension* extension, guint8* header, GBytes* payload, GError** error )`

  Called to process the payload data of a message after it’s received. Reserved bits of the header should be cleared.

#### Virtual methods

###### Soup.WebsocketExtensionClass.configure

Configures `extension` with the given `params`.

since: 3.0

###### Soup.WebsocketExtensionClass.get_request_params

Get the parameters strings to be included in the request header.

since: 3.0

###### Soup.WebsocketExtensionClass.get_response_params

Get the parameters strings to be included in the response header.

since: 3.0

###### Soup.WebsocketExtensionClass.process_incoming_message

Process a message after it’s received.

since: 3.0

###### Soup.WebsocketExtensionClass.process_outgoing_message

Process a message before it’s sent.

since: 3.0