Panda3D
Static Public Member Functions | List of all members
PStatClient Class Reference

Manages the communications to report statistics via a network connection to a remote PStatServer. More...

#include "pStatClient.h"

Static Public Member Functions

static bool connect (const std::string &=std::string(), int=-1)
 
static void disconnect ()
 Closes the connection previously established. More...
 
static bool is_connected ()
 Returns true if the client believes it is connected to a working PStatServer, false otherwise. More...
 
static void main_tick ()
 
static void resume_after_pause ()
 Resumes the PStatClient after the simulation has been paused for a while. More...
 
static void thread_tick (const std::string &)
 

Detailed Description

Manages the communications to report statistics via a network connection to a remote PStatServer.

Normally, there is only one PStatClient in the world, although it is possible to have multiple PStatClients if extraordinary circumstances require in. Since each PStatCollector registers itself with the PStatClient when it is created, having multiple PStatClients requires special care when constructing the various PStatCollectors.

If DO_PSTATS is not defined, we don't want to use stats at all. This class is therefore defined as a stub class.

Definition at line 263 of file pStatClient.h.

Member Function Documentation

◆ disconnect()

void PStatClient::disconnect ( )
inlinestatic

Closes the connection previously established.

Definition at line 270 of file pStatClient.h.

◆ is_connected()

bool PStatClient::is_connected ( )
inlinestatic

Returns true if the client believes it is connected to a working PStatServer, false otherwise.

Definition at line 271 of file pStatClient.h.

◆ resume_after_pause()

void PStatClient::resume_after_pause ( )
inlinestatic

Resumes the PStatClient after the simulation has been paused for a while.

This allows the stats to continue exactly where it left off, instead of leaving a big gap that would represent a chug.

Definition at line 272 of file pStatClient.h.


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