> I heard of this unique ID, but I must be over looking it.   Where is in
> response to what is returned back?
>
> Is the in the #2 ?     I see the int32 -1 (the wierd yyyy)  and after I
> send a 'c' I do get back a 'd' - and the 3rd - 'byte unused' looks like a
> chr(13).   I think you're pointing me in the right direction, if only I
> knew where this 'unique' ID was in the packet.

Forget about the 'c' and 'd' commands.  Those are VERY OLD (only used when
there was less than 200 servers!)

Use the 'e' (A2M_GET_SERVERS_BATCH) command show in the example code at the
bottom of the "server protocol.txt" file.

The request packet looks like this...

'e'
unique_ID (32 bit integer, 4 bytes)

The response packet looks like this...

0xFF, 0xFF, 0xFF, 0xFF (-1 as 32 bit integer, 4 bytes of 255 decimal)
'f'
'\r' (carriage return)
unique_ID (32 bit integer, 4 bytes)
IP_octet1, IP_octet2, IP_octet3, IP_octet4 (IP address as 4 bytes)
port (16 bit port number)
IP_octet1, IP_octet2, IP_octet3, IP_octet4 (IP address as 4 bytes)
port (16 bit port number)
IP_octet1, IP_octet2, IP_octet3, IP_octet4 (IP address as 4 bytes)
port (16 bit port number)
IP_octet1, IP_octet2, IP_octet3, IP_octet4 (IP address as 4 bytes)
port (16 bit port number)
...etc

The unique ID will start at an offset of 6 bytes from the start of the
response packet.  Send 0 (4 bytes of 0) as the unique ID in the first
request.

The number of IP address/port number pairs will be the packet length minus
10 divided by 6 (i.e. num_hosts = (packet_size - 10) / 6)

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to