Bug?

What do you want to see here? Some more categories, forums, and mods? Hmm...
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

wrtlprnft wrote:Let me know if it had any meaning…
Dunno, what does this pack() function do and what is the context? Is it used to query the master server or to ping the servers? I know that there is an unused int in the master server communication (the transaction ID), it was originally meant to speed up the query by not sending servers the client already knows about, but it did not work out and the multi-master setup broke it for good.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Pack creates a byte string. In the case of C it puts in that hexadecimal number, the x is a 0x00.

Code: Select all

$query = pack("xCxxxxxC", 0x35, 0x11);
Puts 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11 together into one string, and then that's what gets written to the master server.
Image
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Hmm, 0x35 is the message type of the "request big server info" message which does not come with any data, so yeah, the extra data looks unneeded.
Post Reply