ReplicaNet and RNLobby
1
|
#include <BackendClient.h>
Public Member Functions | |
bool | Start (const int titleID, const char *encryptionKey) |
bool | GetCompleted (void) |
BackendServer::Reply | GetReply (void) const |
virtual void | CallbackCompleted (void) |
virtual bool | CallbackServerAddress (XPAddress &address) |
void | UseReleaseServers (const bool use=false) |
![]() | |
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 void | CallbackTidy (void) |
![]() | |
ThreadClass () | |
virtual | ~ThreadClass () |
void | Sleep (int milliseconds) |
![]() | |
MutexClass () | |
virtual | ~MutexClass () |
void | Lock (void) |
void | UnLock (void) |
![]() | |
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 void | DisableValidateOrderingCheck (void) |
static bool | IsAuthenticated (void) |
When the BackendClient has successfully completed an authentication request this returns true. | |
![]() | |
static SysTimeType | FloatTime (void) |
![]() | |
static int | CallThreadEntry (ThreadClass *thread_class) |
static int | GetCurrentProcessorNumber (void) |
static size_t | GetNumAllocated (void) |
static size_t | GetNumActive (void) |
Additional Inherited Members | |
![]() | |
enum | { kNoOwnerThread = -1 } |
![]() | |
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) |
![]() | |
void | DoQuitNow (const int returnCode) |
void | CheckQuit (void) |
![]() | |
static size_t | GetNumAllocated (void) |
![]() | |
t_XPSocket * | mSocket |
bool | mAllowDelete |
int | mNOnce |
This backend client can query a backend server to verify the title ID is valid, or can be used to program the rest of the interfaces used by RNLobby.
When using this class to verify a titleID BackendClient::GetReply() must successfully return BackendServer::kReply_ValidTitleID before any other RNLobby client classes are started with their Start() member functions. This is because BackendClient will set the correct server address and encryption key to use for each component service when the component is constructed.
|
virtual |
|
static |
In debug mode an assert will be generated if BackendClient is used after any other RNLobby service. To disable this check for the cases where LAN mode (without internet verification) is used before connecting to the internet please call this function.
bool GetCompleted | ( | void | ) |
Tests the completion state of the last query. When the query completes the result can be retrieved by using GetReply()
BackendServer::Reply GetReply | ( | void | ) | const |
Returns the last reply from a completed query.
bool Start | ( | const int | titleID, |
const char * | encryptionKey | ||
) |
Starts a thread to verify the supplied title ID and encryption key. Using title ID 0 (zero) with any encryption key is a special case and will allow locally hosted servers to be used for debugging purposes.
void UseReleaseServers | ( | const bool | use = false | ) |
Sets BackendClient to query the debug or release servers for server configuration information. For development use the debug servers. For public releases use the release servers.
use | Set to true to use the release servers. By default the debug servers are used. |