Game Server Query Protocol

What is a Server Query?

A query is a request for information from a single gameserver instance, the server should then respond with a set of information that is constantly updated and refreshed. Each value is refreshed but the fields returned stay the same. This is normally accomplished over UDP.

The most popular type of query is a2s which is used by most steam games as it was first introduced with Halflife, adopted as part of the SteamSDK and now natively supported in many other game engines.

The implementation in this document means that the gameserver will directly respond to the requests

a2s Query Protocol

a2s can be enabled various ways in different game engines, the main requirements are https://developer.valvesoftware.com/wiki/Server_queries

Clanforge Requirements for a2s

If you were to manually add a2s, Clanforge needs the gameserver instance to respond to the minimum of:

Important!

Players and Max Players needs to be valid amounts as Clanforge monitoring works on the amount of players and maxplayers of a server to calculate resource usages. The gameserver must respond with maxplayers => players There must be valid map returned however it can be a can be a static string, however Clanforge can track crashes based on maptype, so its highly advisable to include accurate data here.

a2s notes:

Other Query Protocols

There are other types of query protocol and you can even write you own. To test a query protocol you can use our open source tool qstat here: https://github.com/multiplay/qstat and also see the other query types we support.

Example Data

The below is a Counter-Strike, Global Offensive Server, which runs the a2s protocol via steamworks.

Command: qstat -xml -a2s 109.95.210.120:27115

<qstat>
<server type="A2S" address="109.95.210.120:27115" status="UP">
<hostname>109.95.210.120:27115</hostname>
<name>1v1 Aim Arena #16 [Moscow]</name>
<gametype>csgo</gametype>
<map>am_ramps</map>
<numplayers>18</numplayers>
<maxplayers>24</maxplayers>
<numspectators>0</numspectators>
<maxspectators>0</maxspectators>
<ping>53</ping>
<retries>0</retries>
</server>
</qstat>