Game servers will answer the following messages:
Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it
"ping"
Server responds with a single byte code ASCII 'j'
"info"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'C' (info response, S2A_INFO)
(string) net address of server
(string) name of the host / server
(string) name of the map
(string) game directory (i.e. valve/)
(string) Game description (e.g. "half-life multiplay")
(byte) active client count
(byte) maximum clients allowed
(byte) protocol version (currently 7)
"players"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'D' (players response, S2A_PLAYER)
(byte) active client count
for each active client
(byte) client number / index
(string) player name
(int32) client's frag total
(float32) client's total time in-game
"rules"
Server responds with the following packet:
(int32) -1
(byte) ASCII 'E' (rules response, S2A_RULES)
(int16) number of rules
for each rule
(string) rule name
(string) rule value