private void HandlePacket(Packet packet) { UInt16 firstId = packet.m_firstId; UInt16 secondId = packet.m_secondId; BaseHandle handle = SingletonMgr.NetworkMsgHandleFuncMap.GetHandleInstantiateObj(firstId, secondId, m_agent, m_worldActor, this); if (handle != null) { handle.ReceivePacket(packet); } }
private void HandlePacket(Packet packet) { UInt16 firstId = packet.m_firstId; UInt16 secondId = packet.m_secondId; BaseHandle handle = PacketHandleMap.Instance.GetHandleInstantiateObj(firstId, secondId, m_agent, m_worldActor, this); if (handle != null) { handle.ReceivePacket(packet); } }
protected IEnumerator UpdateInMainThread4PacketQueue() { while (true) { while (m_pendingPacketQueue.Count > 0) { lock (this) { Packet packet = m_pendingPacketQueue.Dequeue(); if (packet != null) { ushort firstId = packet.m_firstId; ushort secondId = packet.m_secondId; BaseHandle handle = PacketHandleMap.Instance.GetHandleInstantiateObj(firstId, secondId, this); if (handle != null) { handle.ReceivePacket(packet); } } } } yield return(null); } }
protected IEnumerator UpdateInMainThread4PacketQueue() { while (true) { while (m_pendingPacketQueue.Count > 0) { lock (this) { Packet packet = m_pendingPacketQueue.Dequeue(); if (packet != null) { UInt16 firstId = packet.m_firstId; UInt16 secondId = packet.m_secondId; BaseHandle handle = SingletonMgr.NetworkMsgHandleFuncMap.GetHandleInstantiateObj(firstId, secondId, this); if (handle != null) { handle.ReceivePacket(packet); } } } } yield return(null); } }