Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WinStatsServer Class Reference

The class that owns the main loop, waiting for client connections. More...

#include "winStatsServer.h"

Inheritance diagram for WinStatsServer:
PStatServer ConnectionManager

Public Member Functions

virtual PStatMonitormake_monitor ()
 
- Public Member Functions inherited from PStatServer
void add_reader (Connection *connection, PStatReader *reader)
 Adds the newly-created PStatReader to the list of currently active readers.
 
int add_user_guide_bar (double height)
 Creates a new user guide bar and returns its index number.
 
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, or -1 if no user guide bars fall within the range.
 
int get_num_user_guide_bars () const
 Returns the current number of user-defined guide bars.
 
int get_udp_port ()
 Returns a new port number that will probably be free to use as a UDP port.
 
double get_user_guide_bar_height (int n) const
 Returns the height of the nth user-defined guide bar.
 
virtual bool is_thread_safe ()
 This should be redefined to return true in derived classes that want to deal with multithreaded readers and such.
 
bool listen (int port=-1)
 Establishes a port number that the manager will listen on for TCP connections.
 
void main_loop (bool *interrupt_flag=nullptr)
 An alternative to repeatedly calling poll(), this function yields control of the program to the PStatServer.
 
void move_user_guide_bar (int n, double height)
 Adjusts the height of the nth user-defined guide bar.
 
void poll ()
 Checks for any network activity and handles it, if appropriate, and then returns.
 
void release_udp_port (int port)
 Indicates that the given UDP port is once again free for use.
 
void remove_reader (Connection *connection, PStatReader *reader)
 Removes the indicated reader.
 
void remove_user_guide_bar (int n)
 Removes the user guide bar with the indicated index number.
 
- Public Member Functions inherited from ConnectionManager
PT(Connection) open_TCP_client_connection(const std bool close_connection (const PT(Connection) &connection)
 Terminates a UDP or TCP socket previously opened.
 
const Interfaceget_interface (size_t n)
 
size_t get_num_interfaces ()
 
 PT (Connection) open_TCP_client_connection(const NetAddress &address
 
PT(Connection) open_TCP_server_rendezvous(const std PT (Connection) open_TCP_server_rendezvous(const NetAddress &address
 
PT(Connection) open_UDP_connection(const std PT (Connection) open_TCP_server_rendezvous(uint16_t port
 
 PT (Connection) open_UDP_connection(uint16_t port=0)
 
void scan_interfaces ()
 Repopulates the list reported by get_num_interface()/get_interface().
 
bool wait_for_readers (double timeout)
 Blocks the process for timeout number of seconds, or until any data is available on any of the non-threaded ConnectionReaders or ConnectionListeners, whichever comes first.
 

Additional Inherited Members

- Static Public Member Functions inherited from ConnectionManager
static std::string get_host_name ()
 
- Public Attributes inherited from ConnectionManager
PT(Connection) open_UDP_connection(const std int backlog
 
PT(Connection) open_TCP_server_rendezvous(const std int backlog
 
 get_host_name
 Returns the name of this particular machine on the network, if available, or the empty string if the hostname cannot be determined.
 
 get_interface
 Returns the nth usable network interface detected on this machine.
 
 get_num_interfaces
 This returns the number of usable network interfaces detected on this machine.
 
int timeout_ms
 

Detailed Description

The class that owns the main loop, waiting for client connections.

Definition at line 23 of file winStatsServer.h.

Member Function Documentation

◆ make_monitor()

PStatMonitor * WinStatsServer::make_monitor ( )
virtual

Implements PStatServer.

Definition at line 20 of file winStatsServer.cxx.


The documentation for this class was generated from the following files: