ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
Video chat in your terminal
Loading...
Searching...
No Matches
websocket_connection_data_t Struct Reference

Libwebsockets callback state for one ACIP WebSocket connection. More...

Data Fields

websocket_server_t * server
 Back-reference to server.
acip_transport_t * transport
 ACIP transport for this connection.
platform_thread_t handler_thread
 Client handler thread.
bool handler_started
 True if handler thread was started.
bool cleaning_up
 True if cleanup is in progress (prevents race with remove_client).
uint8_t * pending_send_data
 Current message being sent.
size_t pending_send_len
 Total length of message being sent.
size_t pending_send_offset
 Current offset in message (bytes already sent).
bool has_pending_send
 True if there's an in-progress message.
atomic_t receive_callback_count
 RECEIVE callbacks for this connection.
atomic_t writeable_callback_count
 WRITEABLE callbacks for this connection.

Detailed Description

Libwebsockets callback state for one ACIP WebSocket connection.

Libwebsockets allocates one instance as the protocol's per-session user data and passes it back to every callback for that socket. It ties the socket to the server and ACIP transport, records the handler thread and cleanup state, and keeps the partially-written outbound message until the next writable callback. The callback counters are used to observe races during connection teardown; the transport and pending-send buffer are released by the WebSocket close path.

Definition at line 68 of file lib/network/websocket/server.c.

Field Documentation

◆ cleaning_up

bool websocket_connection_data_t::cleaning_up

True if cleanup is in progress (prevents race with remove_client).

Definition at line 73 of file lib/network/websocket/server.c.

◆ handler_started

bool websocket_connection_data_t::handler_started

True if handler thread was started.

Definition at line 72 of file lib/network/websocket/server.c.

◆ handler_thread

platform_thread_t websocket_connection_data_t::handler_thread

Client handler thread.

Definition at line 71 of file lib/network/websocket/server.c.

◆ has_pending_send

bool websocket_connection_data_t::has_pending_send

True if there's an in-progress message.

Definition at line 79 of file lib/network/websocket/server.c.

◆ pending_send_data

uint8_t* websocket_connection_data_t::pending_send_data

Current message being sent.

Definition at line 76 of file lib/network/websocket/server.c.

◆ pending_send_len

size_t websocket_connection_data_t::pending_send_len

Total length of message being sent.

Definition at line 77 of file lib/network/websocket/server.c.

◆ pending_send_offset

size_t websocket_connection_data_t::pending_send_offset

Current offset in message (bytes already sent).

Definition at line 78 of file lib/network/websocket/server.c.

◆ receive_callback_count

atomic_t websocket_connection_data_t::receive_callback_count

RECEIVE callbacks for this connection.

Definition at line 80 of file lib/network/websocket/server.c.

◆ server

websocket_server_t* websocket_connection_data_t::server

Back-reference to server.

Definition at line 69 of file lib/network/websocket/server.c.

◆ transport

acip_transport_t* websocket_connection_data_t::transport

ACIP transport for this connection.

Definition at line 70 of file lib/network/websocket/server.c.

◆ writeable_callback_count

atomic_t websocket_connection_data_t::writeable_callback_count

WRITEABLE callbacks for this connection.

Definition at line 81 of file lib/network/websocket/server.c.


The documentation for this struct was generated from the following file: