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..."); }
public virtual void processPacket(PacketHandler handle) { //Console.WriteLine("Unhandled packet " + PacketID); }