14#ifndef QUEUEDCONNECTIONREADER_H
15#define QUEUEDCONNECTIONREADER_H
34 public QueuedReturn<NetDatagram> {
36 explicit QueuedConnectionReader(ConnectionManager *manager,
int num_threads);
37 virtual ~QueuedConnectionReader();
44 virtual void receive_datagram(
const NetDatagram &datagram);
46#ifdef SIMULATE_NETWORK_DELAY
48 void start_delay(
double min_delay,
double max_delay);
55 class DelayedDatagram {
65 double _min_delay, _delay_variance;
ConnectionReader(ConnectionManager *manager, int num_threads, const std::string &thread_name=std::string())
Creates a new ConnectionReader with the indicated number of threads to handle requests.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This is a standard, non-reentrant mutex, similar to the Mutex class.
A specific kind of Datagram, especially for sending across or receiving from a network.
bool get_data(NetDatagram &result)
If a previous call to data_available() returned true, this function will return the datagram that has...
bool data_available()
Returns true if a datagram is available on the queue; call get_data() to extract the datagram.
This is the implementation of a family of things that queue up their return values for later retrieva...
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.