Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Eris::MetaQuery Class Reference

MetaQuery is a temporary connection used to retrieve information about a game server. More...

#include <MetaQuery.h>

Inheritance diagram for Eris::MetaQuery:

Eris::BaseConnection List of all members.

Public Member Functions

 MetaQuery (Meta *svr, const std::string &host)
SOCKET_TYPE getSocket ()
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

long getElapsed ()
 Access the elapsed time (in millseconds) since the query was issued.

bool isComplete () const
 Determine whether the query has been handled.

bool isReady (PollData &data) const

Protected Member Functions

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 bindTimeout (Timeout &t, Status sc)
 hook for derived classes to install a signal handler onto the timeout

void setComplete ()
 Called by the Meta system once the reply has been recieved and processed.


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.

Time::Stamp _stamp
 Time stamp of the request, to estimate ping to server.

bool _complete
 Flag to indicate when the query is complete.


Friends

class Meta

Detailed Description

MetaQuery is a temporary connection used to retrieve information about a game server.

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.


The documentation for this class was generated from the following files:
Generated on Thu May 22 08:01:11 2003 for Eris by doxygen1.3-rc3