#define MAX_CLIENTS
Maximum possible clients (static array size) - actual runtime limit set by –max-clients (1-32)
packet_type_t
Network protocol packet type enumeration.
Client state structure and network logging macros.
void initialize_client_info(client_info_t *client)
client_info_t * find_client_by_id(uint32_t client_id)
int add_client(server_context_t *server_ctx, socket_t socket, const char *client_ip, int port)
void cleanup_client_media_buffers(client_info_t *client)
void process_decrypted_packet(client_info_t *client, packet_type_t type, void *data, size_t len)
void cleanup_client_packet_queues(client_info_t *client)
rwlock_t g_client_manager_rwlock
Reader-writer lock protecting the global client manager.
void * client_receive_thread(void *arg)
int remove_client(server_context_t *server_ctx, uint32_t client_id)
void stop_client_threads(client_info_t *client)
client_info_t * find_client_by_socket(socket_t socket)
Find client by socket descriptor using linear search.
int process_encrypted_packet(client_info_t *client, packet_type_t *type, void **data, size_t *len, uint32_t *sender_id)
client_manager_t g_client_manager
Global client manager singleton - central coordination point.
int add_webrtc_client(server_context_t *server_ctx, acip_transport_t *transport, const char *client_ip)
Transport instance structure.
Per-client state structure for server-side client management.
Global client manager structure for server-side client coordination.
_Atomic uint32_t next_client_id
Monotonic counter for unique client IDs (atomic for thread-safety)
client_info_t * clients_by_id
uthash head pointer for O(1) client_id -> client_info_t* lookups
mutex_t mutex
Legacy mutex (mostly replaced by rwlock)
int client_count
Current number of active clients.
Server context - encapsulates all server state.