ReplicaNet and RNLobby
1
|
#include <UserServer.h>
Public Types | |
enum | { kDefaultPort = 4009 } |
Public Types inherited from MutexClass | |
enum | { kNoOwnerThread = -1 } |
Public Member Functions | |
UserServer (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) |
Returns the total number of users. | |
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) |
Static Public Member Functions | |
static int | VerifyUserNonce (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const std::string &userNonce) |
Verifies the input userNonce and returns the corresponding loginID or UserInfo::kAnyLoginID if the user nonce couldn't be verified. | |
static bool | GetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, std::string &value) |
static bool | GetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, int &value) |
static bool | GetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, float &value) |
static bool | SetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, const std::string &value) |
static bool | SetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, const int value) |
static bool | SetVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name, const float value) |
static bool | DeleteVariable (RNReplicaNet::RNODBCSQL::ODBCSQL &sql, const int titleID, const int loginID, const int section, const UserClient::VariableAccess access, const std::string &name) |
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) |
Additional Inherited Members | |
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 Entry * | FindEntry (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 | |
Transport * | mTransport |
bool | mAllowDelete |
int | mNOnce |
std::map< Transport *, Entry > | mConnected |
bool | mIsListen |
bool | mClientGotAPacket |
bool | mClientIsStable |
Entry | mClientEntry |
size_t | mNumConnections |
size_t | mNumTotalConnections |
This class uses the BaseTransportServer class to implement: