HTTP module

ws::ConnectionAdapter

[WebSocket]({#ref classicy_1_1http_1_1ws_1_1WebSocket #}) class which belongs to an HTTP connection.

ConnectionAdapter

#include <icy/http/websocket.h>

Inherits: WebSocketAdapter

WebSocket class which belongs to an HTTP connection.

Public Methods

ReturnNameDescription
ConnectionAdapterCreates a ConnectionAdapter for upgrading an existing HTTP connection to WebSocket. Disables automatic header sending on the underlying connection.
voidonHandshakeComplete virtualCalled when the WebSocket handshake completes. Emits the connect event via the socket emitter chain.

ConnectionAdapter

ConnectionAdapter(Connection * connection, ws::Mode mode)

Creates a ConnectionAdapter for upgrading an existing HTTP connection to WebSocket. Disables automatic header sending on the underlying connection.

Parameters

  • connection The HTTP connection to upgrade.

  • mode ServerSide or ClientSide.


onHandshakeComplete

virtual

virtual void onHandshakeComplete()

Called when the WebSocket handshake completes. Emits the connect event via the socket emitter chain.

Protected Attributes

ReturnNameDescription
Connection *_connection

_connection

Connection * _connection