示例#1
0
 private void MainLoop()
 {
     PacketHandler handler = new PacketHandler(this);
     while (this.Connected)
     {
         while(this.PacketRead.Count > 0)
         {
             Packet packet = this.PacketRead.Dequeue();
             if(packet != null)
                 packet.processPacket(handler);
         }
         Thread.Sleep(10);
     }
     Console.WriteLine("Connection stopped...");
 }
示例#2
0
 public virtual void processPacket(PacketHandler handle)
 {
     //Console.WriteLine("Unhandled packet " + PacketID);
 }