Server-side configuration

As mentioned, we will begin with the server-side of things.

When initializing EQU8, you must give it the path to a directory where it can find the server-side components. Copy the directory equ8_server from the SDK archive, and make sure that your server can access it runtime.

Additionally, you must add the file equ8_server.config to equ8_server. It can be downloaded from your EQU8 control panel, and contains your authentication key and what load-balancer to use.

Server Initialization

The code snippets that are used throughout this integration guide are pulled from the examples directory in the SDK archive.

First we will add calls to initialize and deinitialize the EQU8 server library. This should be done as early as possible. In the example server, we do it at the very top and bottom of the main() function.

The first parameter to the initialization function is the relative, or absolute if you so prefer, path to the equ8_server.config file we downloaded in the previous step.

The second parameter is set to a non-zero value for operating mode and can be one of the following values:

  • equ8_mode_disabled

    • Completely disable EQU8. Use this when developing your game.

  • equ8_mode_production

    • Production mode. EQU8 will monitor cheats and report them to your control panel.

  • equ8_mode_integration

    • Only used during integration. EQU8 will not monitor for cheats, but instead just make sure everything is configured correctly.

C/C++

C/C++
C#
C/C++
int main()
{
int rc = -1;
equ8_err_t equ8_rc;
//
// Initialize the EQU8 server library and exit on failure.
//
if(!EQU8_SUCCESS(equ8_rc = equ8_sm_initialize("equ8_server",
equ8_mode_production)))
{
std::cout << "EQU8 server init failed: " << std::hex
<< equ8_rc << std::endl;
return rc;
}
//
// Deinitialize the EQU8 client library.
//
equ8_sm_deinitialize();
return rc;
}
C#
static void Main(string[] args)
{
//
// Initialize the EQU8 server library and exit on failure.
//
equ8_err equ8_rc;
equ8_rc = equ8.session_manager.initialize(@"equ8_server",
equ8.equ8_mode.production_mode);
if(!equ8_rc.is_ok())
{
Console.WriteLine("EQU8 error: {0}", equ8_rc.get_full());
return;
}
new Server().run();
//
// Deinitialize the EQU8 client library.
//
equ8.session_manager.deinitialize();
}