ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/network/acip/server.h
Go to the documentation of this file.
1
17#ifndef NETWORK_ACIP_SERVER_H
18#define NETWORK_ACIP_SERVER_H
19
20#include "../../network/acip/transport.h"
21#include "../../network/acip/handlers.h"
22#include "../../network/packet/packet.h"
23#include "../../asciichat_errno.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29// =============================================================================
30// Server Receive API
31// =============================================================================
32
46 const acip_server_callbacks_t *callbacks);
47
48// =============================================================================
49// Server Send API (server → client)
50// =============================================================================
51
65asciichat_error_t acip_send_ascii_frame(acip_transport_t *transport, const char *frame_data, size_t frame_size,
66 uint32_t width, uint32_t height, const char *client_id);
67
77
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif // NETWORK_ACIP_SERVER_H
unsigned int uint32_t
Definition common.h:58
asciichat_error_t
Error and exit codes - unified status values (0-255)
Definition error_codes.h:49
asciichat_error_t acip_send_server_state(acip_transport_t *transport, const server_state_packet_t *state)
Send server state update to client (server → client)
asciichat_error_t acip_server_receive_and_dispatch(acip_transport_t *transport, void *client_ctx, const acip_server_callbacks_t *callbacks)
Receive packet from client and dispatch to callbacks.
asciichat_error_t acip_send_ascii_frame(acip_transport_t *transport, const char *frame_data, size_t frame_size, uint32_t width, uint32_t height, const char *client_id)
Send ASCII frame to client (server → client)
asciichat_error_t acip_send_clear_console(acip_transport_t *transport)
Send clear console command to client (server → client)
Server-side packet handler callbacks.
Definition handlers.h:148
Transport instance structure.
Definition transport.h:214
Server state packet structure.
Definition packet.h:706