public void ProcessMessages() { MemoryStream stream; lock (ReceiveQueue) { stream = new MemoryStream(ReceiveQueue.ToArray()); ReceiveQueue.Clear(); } ReceivedMessages = Message.FromPackedBytes(stream); }
public void ProcessMessages() { MemoryStream stream; lock (ReceiveQueue) { stream = new MemoryStream(ReceiveQueue.ToArray()); ReceiveQueue.Clear(); } ReceivedMessages = Message.FromPackedBytes(stream); }