41 bool listen(
int port = -1);
44 void main_loop(
bool *interrupt_flag =
nullptr);
63 virtual void connection_reset(
const PT(
Connection) &connection,
67 void user_guide_bars_changed();
78 Ports _available_udp_ports;
81 typedef vector_stdfloat GuideBars;
82 GuideBars _user_guide_bars;
int find_user_guide_bar(double from_height, double to_height) const
Returns the index number of the first user guide bar found whose height is within the indicated range...
int add_user_guide_bar(double height)
Creates a new user guide bar and returns its index number.
void remove_user_guide_bar(int n)
Removes the user guide bar with the indicated index number.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The primary interface to the low-level networking layer in this package.
int get_udp_port()
Returns a new port number that will probably be free to use as a UDP port.
int get_num_user_guide_bars() const
Returns the current number of user-defined guide bars.
This is an abstract class that presents the interface to any number of different front-ends for the s...
double get_user_guide_bar_height(int n) const
Returns the height of the nth user-defined guide bar.
This is the class that does all the work for handling communications from a single Panda client.
This is the TCP rendezvous socket listener.
void add_reader(Connection *connection, PStatReader *reader)
Adds the newly-created PStatReader to the list of currently active readers.
void remove_reader(Connection *connection, PStatReader *reader)
Removes the indicated reader.
void main_loop(bool *interrupt_flag=nullptr)
An alternative to repeatedly calling poll(), this function yields control of the program to the PStat...
void poll()
Checks for any network activity and handles it, if appropriate, and then returns.
void move_user_guide_bar(int n, double height)
Adjusts the height of the nth user-defined guide bar.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool is_thread_safe()
This should be redefined to return true in derived classes that want to deal with multithreaded reade...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool listen(int port=-1)
Establishes a port number that the manager will listen on for TCP connections.
The overall manager of the network connections.
Represents a single TCP or UDP socket for input or output.
void release_udp_port(int port)
Indicates that the given UDP port is once again free for use.