VgaGames 3 - Network man-pages

[.. upper level ..]

VG3_nw_send_data()

[added in version 1.2]

Send a data-packet to all connected clients.
SYNTAX
void VG3_nw_send_data(struct vg3_nwclient *nwclnt, const char *data)

FUNCTION PARAMETERS
nwclnt Network-struct
data Null-terminated string to send (with max. 1020 bytes including null-terminator)

DESCRIPTION
Send a data-packet to all connected clients. This function sends the string in data to the network-server, which resends it to all connected clients except the sending one. The data-packet will be truncated to 1020 bytes including the terminating null-byte. This function is an addition to the regular VgaGames-network-functions, just to send arbitrary information to other clients. Its main purpose is outside of the game-loop to send data one client selects to other clients. Be aware that, as using the UDP protocol, the possibility of losing a packet could be given, because this function uses no state counter (as VG3_nw_update() does when sending key-strokes).

SEE ALSO
VG3_nw_recv_data() VG3_nw_fetch_data()