示例#1
0
        private void Process(Client c)
        {
            c.packetBuffer.working = true;
            PacketHandler handler;

            while (c.packetBuffer.Available)
            {
                byte[] packet = c.packetBuffer.Dequeue();
                handler = Packets.GetHandler(packet[0]);
                if (handler != null)
                {
                    handler.onReceieve(packet, c);
                }
            }
            c.packetBuffer.working = false;
        }
示例#2
0
 private int GetPacketLength(byte packetID)
 {
     return(Packets.GetPacketLength(packetID));
 }