18 #include "pandatoolbase.h"
19 #include "pStatListener.h"
20 #include "connectionManager.h"
21 #include "vector_stdfloat.h"
46 bool listen(
int port = -1);
49 void main_loop(
bool *interrupt_flag = NULL);
68 virtual void connection_reset(
const PT(
Connection) &connection,
72 void user_guide_bars_changed();
83 Ports _available_udp_ports;
86 typedef vector_stdfloat GuideBars;
87 GuideBars _user_guide_bars;
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.
double get_user_guide_bar_height(int n) const
Returns the height of the nth user-defined guide bar.
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 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...
This is an abstract class that presents the interface to any number of different front-ends for the s...
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 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.
int get_num_user_guide_bars() const
Returns the current number of user-defined guide bars.
virtual bool is_thread_safe()
This should be redefined to return true in derived classes that want to deal with multithreaded reade...
bool listen(int port=-1)
Establishes a port number that the manager will listen on for TCP connections.
void main_loop(bool *interrupt_flag=NULL)
An alternative to repeatedly calling poll(), this function yields control of the program to the PStat...
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.