ServerRuntimeId Class Reference

#include <serverid.h>

Public Member Functions

 ServerRuntimeId (const EnginePlugin *plugin, const QHostAddress &address, unsigned short port)
 
const QHostAddress & address () const
 
bool operator!= (const ServerRuntimeId &other) const
 
bool operator== (const ServerRuntimeId &other) const
 
const EnginePluginplugin () const
 
unsigned short port () const
 

Static Public Member Functions

static ServerRuntimeId fromServer (const ServerPtr server)
 
static ServerRuntimeId fromServer (const Server *server)
 

Detailed Description

A runtime identity of a game server.

This identity denotes the minimum set of attributes where if two different Server instances have all of them equal, then they effectively refer to the same, actual game server.

In simpler words: if the program has discovered the same server twice, for example: via the game's master server and via a LAN broadcast, it may end up with two Server objects that effectively point to the same server. This identity can be used to compare the Server objects, and if it proves to be equal, the Server objects can be merged (or one of them discarded).

The "runtime" part here refers to this being valid within the current runtime only. For performance reasons it compares the server's game by its plugin pointer.

Definition at line 49 of file serverid.h.


The documentation for this class was generated from the following file: