I connect to the server, send "handshake" packet and everything seemed to work, untill I found out that my client does not receive packets from the server. After scanning my client with WPE PRO it says the pocket is received, but the code does not seem to pick it up.
Connection to the server script:
global.Server = tcpconnect(global.ServerIP,global.ServerPort, true); setformat(global.Server, 1);
Handshake packet script:
clearbuffer();
writebyte(02); //0x02
writebyte(00);
writebyte(06);
writestring("e");
writestring("k");
writestring("g");
writestring("a");
writestring("m");
writestring("e");
sendmessage(global.Server);Packet receiving code:
if global.Connected=false exit;
while(1)
{
size = receivemessage(global.Server);
if(size < 0)break;
if(size == 0)
{
print_line("[Info] Connection lost."));
global.Connected=false;
break;
}
mid = readbyte();
switch(mid)
{
case 2:
print_line("[Info] Handshake recieved.");
break;
case 255:
print_line("[Info] Server disconnected.");
break;
}
}I've done some debugging and the receivemessage function always return 0, while WPE says its 35.
How do I fix this?



Find content
Not Telling


