Beispiel #1
0
        public void Enqueue(SteamSocket.Packet packet)
        {
            object obj = this.queue;

            lock (obj)
            {
                this.queue.Enqueue(packet);
            }
        }
Beispiel #2
0
        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);
        }