private void ReceiveMessageInternal() { if (m_timer == null) { return; } lock (m_timer) { Packet?packet; while ((packet = m_peer.Receive()).HasValue) { if (m_ignoredMessages.Contains(packet.Value.MessageID)) { packet.Value.Delete(); } else if (IsInternal(packet.Value.MessageID)) { ProcessInternal(packet.Value); packet.Value.Delete(); } else { m_receiveQueue.Enqueue(packet.Value); } } } }