Exemple #1
0
 public void Register(ushort iPacketID, PacketPriority priority, PacketReceiveCallback onPacketReceive)
 {
     m_Handlers[iPacketID] = new PacketHandler(iPacketID, 0, priority, onPacketReceive);
 }
        /// <summary>
        /// 压入数据包至优先级处理列表
        /// </summary>
        public void Enqueue(PacketHandler packetHandler, PacketReader packetReader)
        {
            PacketExecuteInfo packetExecuteInfo = new PacketExecuteInfo { PacketHandler = packetHandler, PacketReader = packetReader };

            m_PacketHandlers.Add(packetHandler.PacketPriority, packetExecuteInfo);
        }