EQU8 Documentation
  • Welcome
  • Integration Guide
    • Examples
    • Download SDK & copy files
    • Server-side configuration
    • Unique identifier & reading user
    • Accepting player and data
    • Polling server events
    • Client-side Configuration
    • Receiving data from the server
    • Polling client events
    • Protecting game resources
    • Protection template file-format
    • Protection Template Example
    • Renaming EQU8 Launcher
    • Configuring EQU8 Launcher
    • Distributing with EQU8
  • Errors
    • Error Status codes
Powered by GitBook
On this page

Was this helpful?

  1. Integration Guide

Polling client events

Events must be polled often as possible, preferably every “game frame”.

The client-side events are:

  • equ8_event_id_send_request. EQU8 has data to send (same as server).

  • equ8_event_id_error. An error occurred.

If we received a equ8_event_id_send_request event, EQU8 has data that should be sent to the server.

If we received a equ8_event_id_error event, an error was detected. This can be anything for an environmental problem to an internal error. It is recommended that the user is notified and the game is terminated. The error-code should always be saved for debugging purposes.

EQU8 will NEVER send more than 256 (0x100) bytes in a single packet.

equ8_event_t data;
switch(equ8_client_poll_event(&data))
{
    case equ8_event_id_error:
    {
        print_equ8_status_code(data.error.code);
        break;
    }
    case equ8_event_id_send_request:
    {
        packet_equ8_data equ8{
            static_cast<uint8_t *>(data.send_request.payload),
            data.send_request.size };
        send_to_server(&equ8);
        break;
    }
}
switch(equ8.client.poll_event(ev))
{ 
    case equ8.equ8_event_id.error:
        print_equ8_status_code(ev.get_error_event());
        break;
    case equ8.equ8_event_id.send_request:
    {
        packet_equ8_data equ8 = new packet_equ8_data(
            ev.duplicate_send_event());
        send_to_server(equ8);
    }
    break;
}

Closing the session

Ok, so the last thing left to do code-wise is to close the connection to the EQU8 Anti-Cheat servers when player is no longer in a game.

equ8_client_close_session();
equ8.client.close_session();

PreviousReceiving data from the serverNextProtecting game resources

Last updated 4 years ago

Was this helpful?