14#ifndef DATAGRAMQUEUE_H
15#define DATAGRAMQUEUE_H
29class EXPCL_PANDA_NET DatagramQueue {
This class implements a condition variable; see ConditionVar for a brief introduction to this class.
int get_max_queue_size() const
Returns the maximum size the queue is allowed to grow to.
void shutdown()
Marks the queue as shutting down, which will eventually cause all threads blocking on extract() to re...
void set_max_queue_size(int max_size)
Sets the maximum size the queue is allowed to grow to.
bool extract(NetDatagram &result)
Extracts a datagram from the head of the queue, if one is available.
bool insert(const NetDatagram &data, bool block=false)
Inserts the indicated datagram onto the end of the queue, and returns.
int get_current_queue_size() const
Returns the current number of things in the queue.
A standard mutex, or mutual exclusion lock.
A specific kind of Datagram, especially for sending across or receiving from a network.
This is our own Panda specialization on the default STL deque.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.