#include <Metaserver.h>
Public Member Functions | |
| Meta (const std::string &msv, unsigned int maxQueries) | |
| Create a Metaserver object, which manages all interaction with the metaserver itself, and querying active game servers. | |
| unsigned int | getGameServerCount () const |
| Return the total number of game servers the meta server knows about. | |
| const ServerInfo & | getInfoForServer (unsigned int index) const |
| Retrive one of the servers. | |
| void | queryServerByIndex (unsigned int index) |
| Query a specific game server; emits a signal when complete. | |
| void | refresh () |
| Refresh the entire server list. | |
| void | cancel () |
| Cancel outstanding refresh / queries. | |
Public Attributes | |
|
SigC::Signal1< void, const ServerInfo & > | ReceivedServerInfo |
| Emitted when information about a server is received. | |
| SigC::Signal1< void, int > | CompletedServerList |
| Emitted once the complete list of servers has been retrived from the metaserver. | |
| SigC::Signal0< void > | AllQueriesDone |
| Emitted when the entire server list has been refreshed. | |
| SigC::Signal1< void, const std::string & > | Failure |
| Indicates a failure (usually network related) has occurred. | |
Protected Member Functions | |
| virtual void | objectArrived (const Atlas::Objects::Root &obj) |
| void | doFailure (const std::string &msg) |
| void | queryFailure (MetaQuery *q, const std::string &msg) |
| void | queryTimeout (MetaQuery *q) |
| void | metaTimeout () |
| void | connect () |
| initiate a connection to the meta-server : this will issue a keep-alive followed by a list request. | |
| void | disconnect () |
| tear down an existing connection to the server | |
Friends | |
| class | MetaQuery |
|
||||||||||||
|
Create a Metaserver object, which manages all interaction with the metaserver itself, and querying active game servers. Clients might create this object when showing a 'server list' dialog, and use the signals and accessors to pouplate the list. Signals and methods are provided to support common things like displaying query progress, and canceling queries.
|
|
|
Cancel outstanding refresh / queries. This is primarily intended for use with 'Refresh', which might takes several minutes to complete. Note that 'CompletedServerList' is not emitted following cancellation. |
|
|
Retrive one of the servers. Note the ServerInfo object may be invalid if the server has not yet been queried, or has timedout or otherwise failed to answer the query. |
|
|
Refresh the entire server list. This will clear the current list, ask the meta-server for each game server, and then issue a query against every returned server. This process can take a large amount of real-time as the number of game servers increases. Completion of the entire refresh is indicated by the 'CompletedServerList' signal. |
|
|
Emitted once the complete list of servers has been retrived from the metaserver. Argument is the total number of servers in the list |
|
|
Indicates a failure (usually network related) has occurred. The server list will be cleared, and the status set to INVALID. |
1.4.6