ReplicaNet and RNLobby  1
Classes | Public Types | Public Member Functions | List of all members
StatServer Class Reference

#include <StatServer.h>

Inheritance diagram for StatServer:
Inheritance graph
[legend]
Collaboration diagram for StatServer:
Collaboration graph
[legend]

Classes

struct  LoginIDData
 
struct  SessionData
 

Public Types

enum  { kDefaultPort = 4010 }
 
- Public Types inherited from MutexClass
enum  { kNoOwnerThread = -1 }
 

Public Member Functions

 StatServer (const char *lobbyDSN=MRNLobbyDefaultDSN)
 
bool Start (const XPAddress &address=XPAddress(kDefaultPort))
 Because this uses a TransportUDP connection it will call XPURL::RegisterDefaultTransports()
 
size_t GetNumTotal (void) const
 Returns the total number of stats sessions.
 
- Public Member Functions inherited from BaseTransportServer
void SetEncryptionKey (const void *data, const int length)
 
virtual bool StartWithTransport (Transport *transport, const bool allowDelete=true, const bool isListen=true)
 
virtual bool Stop (void)
 
size_t GetNumConnections (void) const
 Returns the number of active connections.
 
size_t GetNumTotalSessions (void) const
 Returns the total number of connections.
 
bool SetAsDisconnecting (Transport *transport)
 This will put the connection into a list pending disconnection after a timeout period.
 
- Public Member Functions inherited from ThreadClass
 ThreadClass ()
 
virtual ~ThreadClass ()
 
void Sleep (int milliseconds)
 
- Public Member Functions inherited from MutexClass
 MutexClass ()
 
virtual ~MutexClass ()
 
void Lock (void)
 
void UnLock (void)
 
- Public Member Functions inherited from Thread
 Thread ()
 
virtual ~Thread ()
 
void Begin (ThreadClass *threaded_class)
 
void Terminate (void)
 
bool GetTerminated (void)
 
bool GetEverTerminated (void)
 
bool GetIsRunning (void) const
 
void SetPreferredProcessor (int processor=kReplicaNetPreferredProcessorOSChoice)
 
int GetPreferredProcessor (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseTransportServer
static SysTimeType FloatTime (void)
 
- Static Public Member Functions inherited from Thread
static int CallThreadEntry (ThreadClass *thread_class)
 
static int GetCurrentProcessorNumber (void)
 
static size_t GetNumAllocated (void)
 
static size_t GetNumActive (void)
 
- Protected Member Functions inherited from BaseTransportServer
virtual bool PackageAndSendData (Transport *transport, const DynamicMessageHelper &message)
 The class mutex is locked during the context of this function.
 
virtual bool CallbackParsePacketData (Transport *transport, void *data, size_t &length, DynamicMessageHelper &result, Entry &entry)
 
virtual void CallbackDataReceived (DynamicMessageHelper &message)
 
virtual void CallbackDataSend (DynamicMessageHelper &message)
 
virtual void CallbackQueryReplyTime (const float seconds)
 
virtual void CallbackTidy (void)
 
int ThreadEntry (void)
 
void GenerateNewNonce (void)
 
int GetConnectionNOnce (Transport *transport=0, const Entry *entry=0)
 Gets the connection's NOnce with respect to a Transport.
 
int CalculateConnectionNOnce (Transport *transport)
 
const EntryFindEntry (Transport *transport)
 
- Protected Member Functions inherited from ThreadClass
void DoQuitNow (const int returnCode)
 
void CheckQuit (void)
 
- Static Protected Member Functions inherited from ThreadClass
static size_t GetNumAllocated (void)
 
- Protected Attributes inherited from BaseTransportServer
TransportmTransport
 
bool mAllowDelete
 
int mNOnce
 
std::map< Transport *, EntrymConnected
 
bool mIsListen
 
bool mClientGotAPacket
 
bool mClientIsStable
 
Entry mClientEntry
 
size_t mNumConnections
 
size_t mNumTotalConnections
 

Detailed Description

Handles requests for statistics Statistics server specific information is stored in the following database tables: