|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
ACIP Discovery Server (ACDS) packet handlers. More...
Go to the source code of this file.
Data Structures | |
| struct | acip_acds_callbacks_t |
| ACDS packet handler callbacks. More... | |
Functions | |
| asciichat_error_t | acip_handle_acds_packet (acip_transport_t *transport, packet_type_t type, const void *payload, size_t payload_len, int client_socket, const char *client_ip, const acip_acds_callbacks_t *callbacks) |
| Handle incoming ACDS packet with O(1) dispatch. | |
ACIP Discovery Server (ACDS) packet handlers.
Provides O(1) array-based packet dispatching for ASCII Chat Discovery Server. Handles session management, WebRTC signaling, and discovery protocol packets.
Definition in file acds_handlers.h.
| asciichat_error_t acip_handle_acds_packet | ( | acip_transport_t * | transport, |
| packet_type_t | type, | ||
| const void * | payload, | ||
| size_t | payload_len, | ||
| int | client_socket, | ||
| const char * | client_ip, | ||
| const acip_acds_callbacks_t * | callbacks | ||
| ) |
Handle incoming ACDS packet with O(1) dispatch.
Dispatches packet to appropriate callback based on type. Uses array-based lookup for constant-time handler selection.
| transport | Transport instance (unused, for API consistency) |
| type | Packet type |
| payload | Packet payload |
| payload_len | Payload length |
| client_socket | Client socket file descriptor |
| client_ip | Client IP address string |
| callbacks | Application callbacks |
Definition at line 71 of file acds_handlers.c.
References ASCIICHAT_OK, ERROR_INVALID_PARAM, log_warn, and SET_ERRNO.
Referenced by acds_client_handler().