The namespace RNLobby provides classes for lobby related functionality broadly related to these areas:
- Binary difference patch creation and delivery. (RNMakePatches tool / Patcher)
- Backend availability and TitleID verification. (RLSrvBackend / BackendServer / BackendClient)
- Internet CD/License key verification. (RLSrvCode / CodeServer / CodeClient)
- NAT Detection. (RLSrvNATDetect / NATDetectServer / NATDetectClient)
- NAT Resolving. (RLSrvNAT / NATResolver) TransportNATUDP for use with XPURL/XPSession/ReplicaNet uses NATResolver.
- Advertising and querying of sessions. (RLSrvAdvertise / AdvertiseServer / AdvertiseClient)
- User account create/authenticate, friends list, game invites, chat rooms and persistent data storage. (RLSrvUser / UserServer / UserClient)
- Statistics and ranking.
Each component may use the RNLobby.com hosted services or custom user hosted services.
To use RNLobby NATUDP transports in XPURL, XPSession or ReplicaNet call RNLobby::RegisterDefaultTransports() before allocating any XPURL, XPSession or ReplicaNet instances. The Transport protocol is NATUDP@ and passing this to XPURL::FindTransport(), XPSession::Create() or ReplicaNet::SessionCreate() will cause this transport to be used.
To use the RNLobby.com hosted servers RNLobby::BackendClient must be used to verify the titleID and encryptionKey. This ensures each components connects to the correct server with the correct internally defined encryption key. When using BackendClient in your own development and test applications use TitleID 1002 and key "ngjfyt64ert" to access the rnlobby.com development server. The rnlobby.com development server is not built to handle many requests and is for small scale tests of less than 64 connections only. The development server may also be restarted for maintainance without warning. The service status report can be accessed from the following page ( http://www.rnlobby.com/RLSrvMonitor.html ). Larger scale tests using the RNLobby.com hosted servers must apply to technical support for a dedicated titleID and encryptionKey. User hosting of RNLobby components may also use RNLobby::BackendClient verification using RNLobby::BackendServer, but it is not mandatory to do so.
NOTE: When using the classes in this library the network stack will be initialised if not already started by other ReplicaNet classes. PlatformHeap::ForceFree() can be used to shutdown the network stack and other internally allocated memory. Using XPURL::ShutdownNetwork(true) or XPSock_Quit() can be used to only shutdown the XPURL or lower level network stack.
NOTE: This version of RNLobby is in the alpha stage of development and as such may be subject to substantial changes until beta.
The Windows pre-built RNLobby servers are available in ReplicaNetPublic. These applications are designed to to be installed as a Windows service or as a DOS command line application. Using a command line of '-?' will display the help for each server. Each application name starts with RLSrv and implements each major RNLobby server component. For example RLSrvAdvertise implements RNLobby::AdvertiseServer. The exception to this rule is RLSrvMonitor which can be configured to regularly create an HTML report of running services, the default output file is RLSrvMonitor although this can be changed by using the -file command line parameter. If these servers are installed as Windows services they are configured to automatically start when Windows starts and to restart if the service encounters a runtime error or exception.
For example, if a Windows server has two IP addresses 1.0.0.1 and 1.0.0.2 then the following commands will configure the RNLobby servers to use their default address and port configurations and start as Windows services. (Two IP addresses are needed for the NATDetectServer to operate correctly.)
- RLSrvMonitor.exe /i /s -file htdocs\RLSrvMonitor.html
- RLSrvBackend.exe /p MySQL /i /s -dstart
- RLSrvNATDetect.exe /i /s -addr 1.0.0.1:3003 -addr2 1.0.0.1:3004 -addr 1.0.0.2:3003 -addr2 1.0.0.2:3004
- RLSrvNAT.exe /i /s -dstart
- RLSrvAdvertise.exe /p MySQL /i /s -dstart
- RLSrvUser.exe /p MySQL /i /s -dstart
- RLSrvStat.exe /p MySQL /i /s -dstart
- RLSrvCode.exe /i /s -dstart -file cdkeys.txt
NOTE: RLSrvMonitor will output a report to the current directory which in this example is the domain directory of an IIS server. The servers Backend, Advertise, User and Stat all access the database so these will wait for the MySQL database to start using the /p command. The Code server will need a list of CD keys in the "cdkeys.txt" file.
Some of the RNLobby server classes use an SQL database (check the class documentation to see if it uses a database) to store information and each class documents any tables used. RNlobby client classes do not require a database to be installed. The RNODBCSQL library is used for database access which implements a wrapper around the ODBC API. Configuring a database is beyond the scope of this documentation however the ODBC Data Source Name (DSN) to use is "RNLobby" (without the quotes). When using Windows the DSN should be a System DSN to allow access to server components that are installed as Windows services. RNLobby has been tested with MySQL V5.0 and this is the recommended database to use. You will need the database and ODBC connector installs http://dev.mysql.com/downloads/mysql/5.0.html and http://dev.mysql.com/downloads/connector/odbc/5.1.html
The MySQL GUI tools available from http://dev.mysql.com/downloads/gui-tools/5.0.html can also be useful.
Most classes in this library use callbacks to exchange information with the user. During these callbacks the component class mutex may be locked and care must be taken to avoid deadlock situations when calling other user defined classes, especially when user defined classes access the same component class from a different thread.
Include files are in the Includes directory "RNLobby/Inc/".
Libraries for static linking are called:
RNLobbyDM and RNLobbyRM for debug and release multi-threaded applications.
RNLobbyDMDLL and RNLobbyRMDLL for debug and release multi-threaded DLL applications.
There is no single threaded support for this library.
Depending on the features used from this API the RNODBCSQL library may need to be added to the link library modules list.
The memory tracking header ("RNPlatform/Inc/MemoryTracking.h") can be auto included by defining REPLICANET_ALWAYSDOMEMORYTRACKING for non-dll based builds.
Generated on Sat Jun 28 22:02:17 2008 for ReplicaNet and RNLobby by
1.5.3