Exemplo n.º 1
0
 public void PacketArrived(InPacket inPacket)
 {
     try
     {
         foreach (IPacketListener listener in listeners)
         {
             if (listener.Accept(inPacket))
             {
                 listener.PacketArrived(inPacket);
                 return;
             }
         }
     }
     catch (Exception e)
     {
         ErrorPacket errorPacket = new ErrorPacket(ErrorPacketType.RUNTIME_ERROR, client.QQUser, e);
         errorPacket.ErrorMessage = client.GenerateCrashReport(e, inPacket);
         errorPacket.Family       = ProtocolFamily.Basic;
         errorPacket.ConnectionId = QQ.NET.Net.QQPort.Main.Name;
         client.PacketManager.AddIncomingPacket(errorPacket, errorPacket.ConnectionId);
     }
 }