Purple Martians
Technical Code Descriptions

Netgame - Packets Overview Client Data State Exchange New Client Setup Ping, Pang and Pong Server Remote Control and Monitoring Server Client File Transfer
Overview Detailed descriptions of all of the packet types used in netgame. Client Data
Packet: 'cdat' description: 'client data' direction: client to server - 1 byte (player) - 4 bytes (frame_num) - 1 byte (comp move of control change)
State Exchange
Packet: 'stdf' description: 'state dif' direction: server to client - 4 bytes (source frame_num) - 4 bytes (destination frame_num) - 1 byte (packet sequence num) - 1 byte (packet sequence total) - 4 bytes (data start byte) - 4 bytes (data size) - up to 1000 bytes of data
Packet: 'stak' description: 'state acknowledge' direction: client to server - 1 byte (player) - 4 bytes (client_state_base_frame_num) - 4 bytes (client_frame_num) - 8 bytes double (client_chase_fps) - 8 bytes double (dsync_avg) - 1 byte (rewind) - 8 bytes double (client_loc_plr_cor) - 8 bytes double (client_rmt_plr_cor) - 8 bytes double (cpu)
New Client Setup
Packet: 'cjon' description: 'client join' direction: client to server - 1 byte (requested color) - 16 bytes (client hostname)
Packet: 'sjon' description: 'server join' direction: server to client - 4 bytes (play level) - 4 bytes (server frame_num) - 1 byte (player number) - 1 byte (player color) - 1 byte (server level sequence number)
Ping, Pang and Pong
Packet: 'ping' description: 'ping' direction: client to server - 8 bytes double (ping timestamp)
Packet: 'pong' description: 'pong' direction: server to client - 8 bytes double (ping timestamp) - 8 bytes double (pong timestamp)
Packet: 'pang' description: 'pang' direction: client to server - 8 bytes double (pong timestamp)
Server Remote Control and Monitoring
Packet: 'cjrc' description: 'client join remote control' direction: client to server no data
Packet: 'sjrc' description: 'server accept client join remote control' direction: server to client no data
Packet: 'snfo' description: 'server info' direction: server to client - 4 bytes (frame_num) - 1 byte (packet sequence num) - 1 byte (packet sequence total) - 4 bytes (data start byte) - 4 bytes (data size) - up to 1000 bytes of data
Packet: 'rctl' description: 'server remote control' direction: client to server - 4 bytes (type) - 8 bytes double (val)
Server Client File Transfer
Packet: 'clrf' description: 'client request file' direction: client to server no data
Packet: 'srrf' description: 'server reply to clrf' direction: server to client - 1 bytes (reply value)
Packet: 'sfil' description: 'server file' direction: server to client - 4 bytes (id) - 1 byte (packet sequence num) - 1 byte (packet sequence total) - 4 bytes (data start byte) - 4 bytes (data size) - 4 bytes (uncompressed file size) - up to 1000 bytes of data
Packet: 'sfak' description: 'sfil acknowledge' direction: client to server - 4 bytes (id)