#include <MetaQuery.h>
Public Member Functions | |
MetaQuery (Meta *svr, const std::string &host, unsigned int index) | |
long | getQueryNo () const |
return the serial-number of the query GET operation [for identification of replies] | |
const std::string & | getHost () const |
return the host string this query is using | |
unsigned int | getServerIndex () const |
long | getElapsed () |
Access the elapsed time (in millseconds) since the query was issued. | |
bool | isReady (PollData &data) const |
bool | isComplete () const |
Protected Member Functions | |
void | setComplete () |
virtual void | onConnect () |
Over-ride the default connection behaviour to issue the query. | |
virtual void | handleFailure (const std::string &msg) |
derived-class notification when a failure occurs | |
virtual void | handleTimeout (const std::string &msg) |
void | onQueryTimeout () |
Protected Attributes | |
const std::string | _host |
The host being querried. | |
Meta * | _meta |
The Meta-server object which owns the query. | |
long | _queryNo |
The serial number of the query GET. | |
WFMath::TimeStamp | _stamp |
Time stamp of the request, to estimate ping to server. | |
unsigned int | m_serverIndex |
bool | m_complete |
Friends | |
class | Meta |
It issues an anoymous GET operation, and expects to recieve an INFO operation containing a 'server' entity in response. This entity contains attributes such as the ruleset, uptime, number of connectec players and so on. In addition, MetaQuery tracks the time the server takes to response, and this estimates the server's ping. This time also includes server latency.