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

#include <BackendServer.h>

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

Classes

struct  TitleIDInfo
 

Public Types

enum  Reply {
  kReply_InvalidTitleID = 0, kReply_ValidTitleID, kReply_TitleIDSupportPeriodExpired, kReply_ServerDownForMaintanence,
  kReply_ServerCannotBeContacted
}
 
enum  { kDefaultPort = 4000, kDefaultDebugPort = 4001 }
 
- Public Types inherited from MutexClass
enum  { kNoOwnerThread = -1 }
 

Public Member Functions

 BackendServer (const char *lobbyDSN=MRNLobbyDefaultDSN)
 
bool Start (const XPAddress &address=XPAddress(kDefaultPort))
 
- Public Member Functions inherited from BaseServer
virtual bool StartWithSocket (t_XPSocket *socket, const bool allowDelete=true)
 
virtual bool Stop (void)
 
void SetEncryptionKey (const void *data, const int length)
 
virtual void CallbackDataReceived (DynamicMessageHelper &message, XPAddress &address)
 
virtual void CallbackDataSend (DynamicMessageHelper &message, XPAddress &address)
 
virtual void CallbackQueryReplyTime (const float seconds)
 
virtual bool CallbackPoll (void)
 
- 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)
 

Static Public Member Functions

static std::string TranslateReply (const Reply reply)
 
- Static Public Member Functions inherited from BaseServer
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)
 

Additional Inherited Members

- Protected Member Functions inherited from BaseServer
virtual bool PackageAndSendData (t_XPSocket *socket, const DynamicMessageHelper &message, const XPAddress &address)
 
virtual bool CallbackParsePacketData (t_XPSocket *socket, const XPAddress &addr, void *data, size_t &length, DynamicMessageHelper &result)
 
int ThreadEntry (void)
 
- 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 BaseServer
t_XPSocketmSocket
 
bool mAllowDelete
 
int mNOnce
 

Detailed Description

This class is used to provide a TitleID verification service to BackendClient Backend TitleID information is stored in the following table:

Member Function Documentation

bool Start ( const XPAddress address = XPAddress(kDefaultPort))

Starts the code server thread and processes code queries. If not already started the network hardware is started.

Returns
Success returns true, failure returns false.