|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
ACIP Discovery Server (ACDS) packet handlers with O(1) dispatch. More...
Go to the source code of this file.
Data Structures | |
| struct | acds_hash_entry_t |
| Hash table entry for ACDS packet type to handler mapping. More... | |
Macros | |
| #define | ACDS_HASH_SIZE 32 |
| #define | ACDS_HANDLER_COUNT 11 |
| #define | ACDS_HASH(type) ((type) % ACDS_HASH_SIZE) |
Typedefs | |
| typedef asciichat_error_t(* | acip_acds_handler_func_t) (const void *payload, size_t payload_len, int client_socket, const char *client_ip, const acip_acds_callbacks_t *callbacks) |
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) |
ACIP Discovery Server (ACDS) packet handlers with O(1) dispatch.
Implements O(1) array-based packet dispatching for ascii-chat Discovery Server. Handles ACIP packets 100-150: session management, WebRTC signaling, discovery.
Definition in file acds_handlers.c.
| #define ACDS_HANDLER_COUNT 11 |
Definition at line 31 of file acds_handlers.c.
| #define ACDS_HASH | ( | type | ) | ((type) % ACDS_HASH_SIZE) |
Definition at line 41 of file acds_handlers.c.
| #define ACDS_HASH_SIZE 32 |
Definition at line 30 of file acds_handlers.c.
| typedef asciichat_error_t(* acip_acds_handler_func_t) (const void *payload, size_t payload_len, int client_socket, const char *client_ip, const acip_acds_callbacks_t *callbacks) |
Definition at line 26 of file acds_handlers.c.
| 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 | ||
| ) |
Definition at line 118 of file acds_handlers.c.
Referenced by acds_client_handler().