Skip to content

cf_server_send

Category: net
GitHub: cute_networking.h


Sends a packet to a client.

CF_Result cf_server_send(CF_Server* server, const void* packet, int size, int client_index, bool send_reliably);
Parameters Description
server The server.
packet Data to send.
size Size of data in bytes.
client_index An index representing a particular client, from CF_ServerEvent.
send_reliably If true the packet will be sent reliably and in order. If false the packet will be sent just once, and may
arrive out of order or not at all.

Return Value

Returns any errors as a CF_Result (e.g. the send queue being full).

cf_server_update
cf_server_pop_event
cf_server_send_to_all
CF_ServerEvent