Пример #1
0
 private void Handle(TcpClient client)
 {
     while (true)
     {
         int messageSize = client.ReadBigEndianInt32().Result;
         var networkBytes = client.ReadBytes(messageSize).Result;
         var res = _MessageHandlers[(ApiKeyEnum) networkBytes.ReadBigEndianInt16()](networkBytes);
         client.Client.Send(res.BytesForWire());
     }
 }