public void Enqueue(SteamSocket.Packet packet) { object obj = this.queue; lock (obj) { this.queue.Enqueue(packet); } }
public bool TryDequeue(out SteamSocket.Packet packet) { object obj = this.queue; lock (obj) { if (this.queue.Count > 0) { packet = this.queue.Dequeue(); return(true); } } packet = default(SteamSocket.Packet); return(false); }