ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
websocket_transport_data_t Struct Reference

WebSocket transport implementation data. More...

#include <include/ascii-chat/network/websocket/internal.h>

Data Fields

struct lws * wsi
 libwebsockets instance (owned)
 
struct lws_context * context
 libwebsockets context (may be owned or borrowed)
 
bool owns_context
 True if transport owns context (client), false if borrowed (server)
 
ringbuffer_t * recv_queue
 Receive message queue.
 
ringbuffer_t * send_queue
 Send message queue (for server-side transports)
 
mutex_t recv_mutex
 Protect recv_queue operations only.
 
cond_t recv_cond
 Signal when recv_queue messages arrive.
 
mutex_t send_mutex
 Protect send_queue operations only.
 
bool is_connected
 Connection state.
 
bool connection_failed
 Connection attempt failed (for client-side detection)
 
mutex_t state_mutex
 Protect state changes.
 
cond_t state_cond
 Signal when is_connected changes (for connection wait)
 
uint8_t * send_buffer
 Send buffer with LWS_PRE padding.
 
size_t send_buffer_capacity
 Current send buffer capacity.
 
asciichat_thread_t service_thread
 Thread that services libwebsockets context.
 
volatile bool service_running
 Service thread running flag.
 
uint8_t * partial_buffer
 Partial message buffer being assembled.
 
size_t partial_size
 Current size of partial buffer.
 
size_t partial_capacity
 Capacity of partial buffer.
 
uint64_t reassembly_start_ns
 Start time of current reassembly (for timeout detection)
 
int fragment_count
 Fragment count for current reassembly.
 
bool reassembling
 True if currently assembling a message.
 
ringbuffer_t * pending_free_queue
 Queue of buffers pending delayed free.
 
mutex_t pending_free_mutex
 Protect pending_free_queue operations.
 
atomic_t is_destroying
 True when destruction has started.
 

Detailed Description

WebSocket transport implementation data.

Definition at line 47 of file network/websocket/internal.h.

Field Documentation

◆ connection_failed

bool websocket_transport_data_t::connection_failed

Connection attempt failed (for client-side detection)

Definition at line 57 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create().

◆ context

struct lws_context* websocket_transport_data_t::context

libwebsockets context (may be owned or borrowed)

Definition at line 49 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ fragment_count

int websocket_transport_data_t::fragment_count

Fragment count for current reassembly.

Definition at line 74 of file network/websocket/internal.h.

◆ is_connected

bool websocket_transport_data_t::is_connected

◆ is_destroying

atomic_t websocket_transport_data_t::is_destroying

True when destruction has started.

Definition at line 86 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create().

◆ owns_context

bool websocket_transport_data_t::owns_context

True if transport owns context (client), false if borrowed (server)

Definition at line 50 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ partial_buffer

uint8_t* websocket_transport_data_t::partial_buffer

Partial message buffer being assembled.

Definition at line 70 of file network/websocket/internal.h.

◆ partial_capacity

size_t websocket_transport_data_t::partial_capacity

Capacity of partial buffer.

Definition at line 72 of file network/websocket/internal.h.

◆ partial_size

size_t websocket_transport_data_t::partial_size

Current size of partial buffer.

Definition at line 71 of file network/websocket/internal.h.

◆ pending_free_mutex

mutex_t websocket_transport_data_t::pending_free_mutex

Protect pending_free_queue operations.

Definition at line 81 of file network/websocket/internal.h.

Referenced by acip_websocket_server_transport_create().

◆ pending_free_queue

ringbuffer_t* websocket_transport_data_t::pending_free_queue

Queue of buffers pending delayed free.

Definition at line 80 of file network/websocket/internal.h.

Referenced by acip_websocket_server_transport_create().

◆ reassembling

bool websocket_transport_data_t::reassembling

True if currently assembling a message.

Definition at line 75 of file network/websocket/internal.h.

◆ reassembly_start_ns

uint64_t websocket_transport_data_t::reassembly_start_ns

Start time of current reassembly (for timeout detection)

Definition at line 73 of file network/websocket/internal.h.

◆ recv_cond

cond_t websocket_transport_data_t::recv_cond

Signal when recv_queue messages arrive.

Definition at line 54 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ recv_mutex

mutex_t websocket_transport_data_t::recv_mutex

Protect recv_queue operations only.

Definition at line 53 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ recv_queue

ringbuffer_t* websocket_transport_data_t::recv_queue

Receive message queue.

Definition at line 51 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ send_buffer

uint8_t* websocket_transport_data_t::send_buffer

Send buffer with LWS_PRE padding.

Definition at line 60 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ send_buffer_capacity

size_t websocket_transport_data_t::send_buffer_capacity

Current send buffer capacity.

Definition at line 61 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ send_mutex

mutex_t websocket_transport_data_t::send_mutex

Protect send_queue operations only.

Definition at line 55 of file network/websocket/internal.h.

Referenced by acip_websocket_server_transport_create().

◆ send_queue

ringbuffer_t* websocket_transport_data_t::send_queue

Send message queue (for server-side transports)

Definition at line 52 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ service_running

volatile bool websocket_transport_data_t::service_running

Service thread running flag.

Definition at line 65 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create().

◆ service_thread

asciichat_thread_t websocket_transport_data_t::service_thread

Thread that services libwebsockets context.

Definition at line 64 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create().

◆ state_cond

cond_t websocket_transport_data_t::state_cond

Signal when is_connected changes (for connection wait)

Definition at line 59 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ state_mutex

mutex_t websocket_transport_data_t::state_mutex

Protect state changes.

Definition at line 58 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().

◆ wsi

struct lws* websocket_transport_data_t::wsi

libwebsockets instance (owned)

Definition at line 48 of file network/websocket/internal.h.

Referenced by acip_websocket_client_transport_create(), and acip_websocket_server_transport_create().


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