In the announcement packet, why not make one of the bytes a random number generated by that 64. That random number would be the value which determines which computer goes first. Each 64 has their own random number which it sends out in the packet. It then receives the other computers announcement packet. Both computers now have 2 random numbers.. one generated by itself, and one by the opposing computer. Simply compare them and whichever computer had the larger (or smaller) random number, that computer goes first.
Or I guess, on the off chance that both computers coincidentally had the same random number, send 2 random numbers in the packet.
Post by Leif Bloomquist on Nov 8, 2006 17:29:09 GMT -5
Regarding packet type 5 (chat), I found it's much easier to include the # of characters in the message before letter 1 of message, rather than just zero-terminating the message (but will do both). Will update soon.