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 [[email protected]_connect_async]. To accept WebSocket connections, create a [class@Server] and add a handler to it with [[email protected]_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 [ [email protected]_text] and [[email protected]_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:

All known members inherited from class GLib.Object



2022 vala-language.org