More features
Dedicated server browser
Listing dedicated servers, and querying their players and settings.
This is for dedicated servers: a machine running your game with no player on it. It is a different thing from lobbies, which is where player hosted games live.
If your game is player hosted, you want sessions instead. Nothing on this page applies.
Listing servers
Call Refresh Server List on the SteamForge Server Browser subsystem with a list type:
| Type | What it queries |
|---|---|
| Internet | Valve's master server list. Everything, and the slowest. |
| LAN | A broadcast on the local network. Fast, and works with no Steam connection. |
| Friends | Servers friends are on right now |
| Favorites | The player's starred servers, shared with Steam's own browser |
| History | Servers the player connected to recently |
| Spectator | Servers running in spectator mode |
Results arrive one at a time on On Server Found, not as a finished array. On Server List Complete fires when the refresh ends.
Get Servers returns everything found so far, Is Refreshing Servers says whether one is running, and Cancel Server List Refresh stops it.
Filters
Refresh Server List takes a map of filter keys, applied by Valve's master server before results are sent:
| Key | Matches |
|---|---|
map | Servers on one map |
gamedir | One game directory |
secure | Anti cheat secured servers |
notfull | Servers with room |
noplayers | Empty servers |
gametagsand | Servers carrying all of these tags |
Filtering at the master server rather than locally is the difference between a browser that lists your game's servers and one that downloads every server on Steam first.
What a result carries
Each Steam Server Info arrives populated:
| Field | Meaning |
|---|---|
| Name, Map Name, Game Description | What to show in a row |
| Address, Query Port | Where it is, and what to pass to the query nodes |
| Ping Ms | Latency, or -1 if it never answered |
| Players, Max Players, Bot Players | Occupancy |
| Password Protected, Secure | Whether a password is needed, and whether anti cheat is on |
| Friends Playing | How many of the player's friends are on it |
| Game Tags | Whatever the server published, for your own filtering |
| Responded | False for a server on the list that did not answer the query |
Asking one server for more
Three queries, each taking an address and query port from a result:
| Node | Answers on | Gives you |
|---|---|---|
| Request Server Players | On Server Players Received | Who is on it, with score and time connected |
| Request Server Rules | On Server Rules Received | The server's published key and value settings |
| Request Server Friends | On Server Friends Received | Which of the player's friends are on it |
Ping Server re-pings a single server and answers on On Server Pinged, which is what a Refresh button on one row should call rather than refreshing the whole list.
Cancel Server Query stops an outstanding query.
Where to go next
Networking, for talking to a server once connected.