Network Specification: META Command - McSherry/AppsAgainstHumanity GitHub Wiki
This page details the format of the information sent by the META
command listed in the AAH Networking Specification, which allows a client to request information on a server prior to joining the game. All Base64 encoding is performed with the class provided in the C# Base Class Library.
All XML elements listed are contained within a root element <meta>
which immediately follows the XML document type declaration.
- Client
META
Format - Parameter-less (Request)
- Parameterised (Inform)
- Server
META
Format - Parameter-less (Request)
- Parameterised (Inform)
The client META
command takes two formats: one with parameters, and one without. When this command is sent by the client with parameters, it must be sent after the client has sent a JOIN
and received an ACKN
, otherwise it will receive no response. When sent without parameters, it is a request for the server to respond with metadata, rather than a request for the server to interpret the client's metadata.
As said above, the parameter-less format requests information from the server. There is no set purpose for what the client should do with this information, but it is available if the client wants it. This format of the META
command may be sent at any time by the clients, regardless of whether the client has successfully joined the game.
For information on the XML string sent in reply, please see the Server META
Format section.
This form of the client META
command informs the server of the client's capabilities, as well as providing it with other information which may be deemed useful. The XML elements that this form must include are described below. When sending in the parameterised form, all parameters listed below should be present.
Parameter | Valid Values | Support | Meaning / Purpose |
---|---|---|---|
<version> |
Version Identifier (see reference) |
None | Lists the AAH version the client is compatible with using values from the version reference. |
Although this contains only a single parameter at the moment, this format was chosen as it is extensible, and allows easy expansion of parameters present.
As with the client's META
format, the server's format takes two varieties: one with, and one without, parameters, where the former is the server providing information, and the latter is it requesting information.
This format may be sent by the server to the client in order to request metadata about said client, which the server may use for version identification, among other purposes. Clients must respond within 1.5 seconds (1500ms
), else the server is free to disconnect them. It is recommended that servers send this after receiving a JOIN
from a client, but prior to sending an ACKN
or REFU
.
Clients must respond in the parameterised form shown in the client section of this document.
In this form, a server is responding to a request for metadata by a client. It is recommended that, should clients request this metadata, it is used in a manner which will allow the reduction of server load. For example, refusing to connect to a server again if said server has recently reported that it is incompatible with the client's version of AAH.
Parameter | Valid Values | Support | Meaning / Purpose |
---|---|---|---|
<version> |
Version Identifier (see reference) |
None | Lists the AAH version the server is compatible with using values from the version reference. |
<playermax> |
2 to 5
|
None | The maximum number of players that can be connected to the server. |
<players> |
0 to 5
|
None | The number of players currently connected to the server. |
<ruleset> |
Ruleset Identifier (see reference) |
None | The ruleset currently in use by the server. See reference for more details. |
<aplimit> |
4 to 10
|
None | The number of Awesome Points the server requires a player to obtain in order to win a game. |
<timeout> |
15 to 60
|
None | The time limit players are given to choose cards in. Units are seconds. |
Note that some values, such as player limits, are still preliminary, and are likely to be changed in future.