WebsocketConnection


Object Hierarchy:

Soup.WebsocketConnection Soup.WebsocketConnection Soup.WebsocketConnection GLib.Object GLib.Object GLib.Object->Soup.WebsocketConnection

Description:

[ CCode ( type_id = "soup_websocket_connection_get_type ()" ) ]
public sealed class WebsocketConnection : Object

The WebSocket Protocol

Provides support for the WebSocket protocol.

To connect to a WebSocket server, create a [class@Session] and call [method@Session.websocket_connect_async]. To accept WebSocket connections, create a [class@Server] and add a handler to it with [method@Server.add_websocket_handler].

(Lower-level support is available via [func@websocket_client_prepare_handshake] and [func@websocket_client_verify_handshake], for handling the client side of the WebSocket handshake, and [func@websocket_server_process_handshake] for handling the server side.)

WebsocketConnection handles the details of WebSocket communication. You can use [ method@WebsocketConnection.send_text] and [method@WebsocketConnection.send_binary] to send data, and the [signal@WebsocketConnection: SoupWebsocketConnection:message] signal to receive data. (WebsocketConnection currently only supports asynchronous I/O.)


Namespace: Soup
Package: libsoup-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members: