eris  1.4.0
A WorldForge client library.
Eris::ServerInfo Struct Reference

#include <ServerInfo.h>

Collaboration diagram for Eris::ServerInfo:

Public Types

enum  Status { INVALID, QUERYING, VALID, TIMEOUT }
 

Public Member Functions

void processServer (const Atlas::Objects::Entity::RootEntity &svr)
 

Public Attributes

std::string host
 
Status status = INVALID
 
std::string name
 retrieve the human-readable name of the server (e.g 'Bob's Mason Server') More...
 
std::string ruleset
 retrieve a human-readable name of the ruleset (e.g. 'mason' or 'circe') More...
 
std::string server
 the server program name, i.e 'stage' or 'cyphesis' More...
 
long protocol_version
 version of the protocol used More...
 
int clients
 the number of clients currently connected to the server More...
 
int ping = -1
 
long entities
 the number of entities on the server More...
 
double uptime
 the server's uptime in seconds More...
 
std::string version
 the server program version, as a free text string More...
 
std::string buildDate
 the server program build-date, as a free text string More...
 
std::vector< std::string > assets
 

Detailed Description

Information about a specific game server, retrieved via the Meta-server and anonymous GETs. The information includes statistics (uptime, number of clients), configuration (ruleset) and general information (an adminsitrator specifed name). This data is intended to allow clients to display a browser interface, similar to those found in Quake 3 or Tribes 2, from which they can select a server to play on. Note that in the future, each ServerInfo will represent a game world instance, not necessarily a single server, and that a single server might run multiple games. Thus, hostname / IP is a very poor ordering / caching value. Some sort of unique game-instance ID may need to be developed here.

Definition at line 22 of file ServerInfo.h.

Member Enumeration Documentation

◆ Status

Enumerator
TIMEOUT 

server query timed out

Definition at line 25 of file ServerInfo.h.

Member Function Documentation

◆ processServer()

void Eris::ServerInfo::processServer ( const Atlas::Objects::Entity::RootEntity &  svr)

called by Meta when info is received from the server, sets status to valid.

Definition at line 19 of file ServerInfo.cpp.

References assets, buildDate, clients, entities, name, protocol_version, ruleset, server, uptime, and version.

Referenced by Eris::Meta::disconnect(), and Eris::Connection::handleFailure().

Member Data Documentation

◆ assets

std::vector<std::string> Eris::ServerInfo::assets

A list of assets URLs, from which assets can be downloaded using WFUT.

Definition at line 75 of file ServerInfo.h.

Referenced by processServer().

◆ buildDate

std::string Eris::ServerInfo::buildDate

the server program build-date, as a free text string

Definition at line 70 of file ServerInfo.h.

Referenced by processServer().

◆ clients

int Eris::ServerInfo::clients

the number of clients currently connected to the server

Definition at line 56 of file ServerInfo.h.

Referenced by processServer().

◆ entities

long Eris::ServerInfo::entities

the number of entities on the server

Definition at line 62 of file ServerInfo.h.

Referenced by processServer().

◆ host

std::string Eris::ServerInfo::host

the hostname (or dotted-decimal IP) of the server. For multi-server worlds, this will be a name that resolves to a machine capable of accepting the initial LOGIN, and hence should not need special handling.

Definition at line 42 of file ServerInfo.h.

◆ name

std::string Eris::ServerInfo::name

retrieve the human-readable name of the server (e.g 'Bob's Mason Server')

Definition at line 47 of file ServerInfo.h.

Referenced by processServer().

◆ ping

int Eris::ServerInfo::ping = -1

the round-trip time to the server. The meaning of this when multi-server worlds exist needs to be considered. Verify the accuracy of the ping estimation, since it is currently very poor

Definition at line 60 of file ServerInfo.h.

Referenced by Eris::Meta::disconnect().

◆ protocol_version

long Eris::ServerInfo::protocol_version

version of the protocol used

Definition at line 53 of file ServerInfo.h.

Referenced by processServer().

◆ ruleset

std::string Eris::ServerInfo::ruleset

retrieve a human-readable name of the ruleset (e.g. 'mason' or 'circe')

Definition at line 49 of file ServerInfo.h.

Referenced by processServer().

◆ server

std::string Eris::ServerInfo::server

the server program name, i.e 'stage' or 'cyphesis'

Definition at line 51 of file ServerInfo.h.

Referenced by processServer().

◆ uptime

double Eris::ServerInfo::uptime

the server's uptime in seconds

Definition at line 65 of file ServerInfo.h.

Referenced by processServer().

◆ version

std::string Eris::ServerInfo::version

the server program version, as a free text string

Definition at line 68 of file ServerInfo.h.

Referenced by processServer().


The documentation for this struct was generated from the following files: