emileej Posted August 17, 2004 Report Posted August 17, 2004 My packet:0 0x1 0 0 0xd7 0xff 0xff 0xffI don't get any reply from the server and I'm thinking I might have inderecly changed something in my connect request packet.
emileej Posted August 17, 2004 Author Report Posted August 17, 2004 The packet data is created like so:packet.type=0x00; packet.subtype=0x01; packet.key=-(rand() % 0x7FFFFFFF); packet.version=0x0001;
Miesco Posted August 18, 2004 Report Posted August 18, 2004 Are you sending in little-endian byte order? to check you could send the last short packet seperatly, as 01 00 so it would be like:packet.type=0x00;packet.subtype=0x01;packet.key=-(rand() % 0x7FFFFFFF);packet.version1=0x01;packet.version2=0x00;
emileej Posted August 18, 2004 Author Report Posted August 18, 2004 eek! I found what was wrong! Since I thought the #pragma pack(1) only affected the size of the structs - I had removed it. Putting it right back in solved the problem.
Recommended Posts