I'm having a problem with the Client Handshake and the ClientKeyPacket.
Login is fine, when I recieve the game connection I send the ServerKeyPacket:
I'm supposed to get the ClientKeyPacket back from the client right?
Cause after I sent that I just get a blank packet and the client disconnects >.<
I'm using a 5095 client to test since it's the only one I have.
Any ideas?
EDIT:
Before it says Client Handshake Reply should be the dump of the received packet, but it's blank so it dumps nothing.
The error is caused because the packet is blank..
[Only registered and activated users can see links. Click Here To Register...]
Login is fine, when I recieve the game connection I send the ServerKeyPacket:
Code:
byte[] Junk1 = new byte[11];
byte[] Junk2 = new byte[5];
Xio.Random.NextBytes(Junk1);
Xio.Random.NextBytes(Junk2);
COPacket P = new COPacket(68 + p.Length + g.Length + pub_key.Length);
P.WriteBytes(Junk1);
P.WriteUInt32(Convert.ToUInt32(P.Length - 11));
P.WriteUInt32(5);
P.WriteBytes(Junk2);
P.WriteUInt32(Convert.ToUInt32(ClientIV.Length));
P.WriteBytes(ClientIV);
P.WriteUInt32(Convert.ToUInt32(ServerIV.Length));
P.WriteBytes(ServerIV);
P.WriteUInt32(Convert.ToUInt32(p.Length));
P.WriteString(p);
P.WriteUInt32(Convert.ToUInt32(g.Length));
P.WriteString(g);
P.WriteUInt32(Convert.ToUInt32(pub_key.Length));
P.WriteString(pub_key);
P.WriteString("TQServer");
return P.Packet;
Cause after I sent that I just get a blank packet and the client disconnects >.<
I'm using a 5095 client to test since it's the only one I have.
Any ideas?
EDIT:
Before it says Client Handshake Reply should be the dump of the received packet, but it's blank so it dumps nothing.
The error is caused because the packet is blank..
[Only registered and activated users can see links. Click Here To Register...]