05-17-2016, 01:12 AM
Я пробую взять значение сессии из ClientConnection, но что то не получается.
PROTOCOL_BASE_CONNECT_ACK
class PROTOCOL_BASE_CONNECT_ACK : ServerPacket
{
ClientConnection session = new ClientConnection();
public override void WriteImpl()
{
WriteH(0);
WriteC(10); // Channel Count
for (int i = 0; i < 10; i++)
WriteC(0x1);
WriteH(133);
WriteH(128);
WriteC(183);
WriteB(new byte[] {
0x8f, 0x23, 0x9e, 0xd9, 0xfc, 0x99, 0x6f, 0x28, 0xeb, 0x5e, 0xf9, 0xa6, 0x8d, 0x39, 0xf6, 0xce,
0x31, 0xb3, 0x27, 0x9b, 0x2f, 0xd5, 0x1f, 0x93, 0x81, 0x08, 0x0f, 0x49, 0x7c, 0x01, 0x9e, 0x16,
0x97, 0x73, 0x72, 0x96, 0x3f, 0x06, 0xe0, 0xa5, 0x16, 0xaf, 0xbc, 0xb4, 0xab, 0xba, 0x63, 0x24,
0xdb, 0xdf, 0x3e, 0x4b, 0x70, 0xcd, 0xd6, 0x72, 0x03, 0x27, 0x89, 0xef, 0xbe, 0xa3, 0xc7, 0x7d,
0xc5, 0x6f, 0xfa, 0x40, 0xba, 0x49, 0xea, 0x77, 0xaf, 0x90, 0x40, 0xb2, 0x77, 0xbe, 0x10, 0xcb,
0x30, 0x7d, 0x67, 0x63, 0x7a, 0x2d, 0x77, 0x5b, 0x13, 0x34, 0x87, 0x5e, 0xb8, 0x8f, 0xf9, 0x29,
0x7a, 0xb5, 0x42, 0x77, 0x09, 0xc6, 0x64, 0x39, 0x78, 0xaa, 0x53, 0x89, 0xe5, 0xb9, 0xb9, 0x65,
0x65, 0xd5, 0x0b, 0x45, 0x2c, 0x50, 0xae, 0x44, 0xc0, 0x2a, 0x7e, 0xa1, 0xcc, 0x8f, 0x91,
});
WriteB(new byte[] { 0x01, 0x00, 0x11 });
WriteC(3);
WriteH(4);
WriteH(0);
WriteD(session.Id);
}
}
}
{
ClientConnection session = new ClientConnection();
public override void WriteImpl()
{
WriteH(0);
WriteC(10); // Channel Count
for (int i = 0; i < 10; i++)
WriteC(0x1);
WriteH(133);
WriteH(128);
WriteC(183);
WriteB(new byte[] {
0x8f, 0x23, 0x9e, 0xd9, 0xfc, 0x99, 0x6f, 0x28, 0xeb, 0x5e, 0xf9, 0xa6, 0x8d, 0x39, 0xf6, 0xce,
0x31, 0xb3, 0x27, 0x9b, 0x2f, 0xd5, 0x1f, 0x93, 0x81, 0x08, 0x0f, 0x49, 0x7c, 0x01, 0x9e, 0x16,
0x97, 0x73, 0x72, 0x96, 0x3f, 0x06, 0xe0, 0xa5, 0x16, 0xaf, 0xbc, 0xb4, 0xab, 0xba, 0x63, 0x24,
0xdb, 0xdf, 0x3e, 0x4b, 0x70, 0xcd, 0xd6, 0x72, 0x03, 0x27, 0x89, 0xef, 0xbe, 0xa3, 0xc7, 0x7d,
0xc5, 0x6f, 0xfa, 0x40, 0xba, 0x49, 0xea, 0x77, 0xaf, 0x90, 0x40, 0xb2, 0x77, 0xbe, 0x10, 0xcb,
0x30, 0x7d, 0x67, 0x63, 0x7a, 0x2d, 0x77, 0x5b, 0x13, 0x34, 0x87, 0x5e, 0xb8, 0x8f, 0xf9, 0x29,
0x7a, 0xb5, 0x42, 0x77, 0x09, 0xc6, 0x64, 0x39, 0x78, 0xaa, 0x53, 0x89, 0xe5, 0xb9, 0xb9, 0x65,
0x65, 0xd5, 0x0b, 0x45, 0x2c, 0x50, 0xae, 0x44, 0xc0, 0x2a, 0x7e, 0xa1, 0xcc, 0x8f, 0x91,
});
WriteB(new byte[] { 0x01, 0x00, 0x11 });
WriteC(3);
WriteH(4);
WriteH(0);
WriteD(session.Id);
}
}
}