Server List

Airship provides a basic server list that can be used to retrieve servers which may be accessible to a player in your game. The server list functions can be found in Platform.Server.ServerManager.

Listing a Server

A server can be listed at any time using the following code:

await Platform.Server.ServerManager.ListServer({
    // Name and description are optional
    name: "My Server",
    description: "A running server you can join",
})

You can call this again to update the name or description.

Delist a Server

If you want to remove a server from the list, you can do so at any time using the following code:

await Platform.Server.ServerManager.DelistServer();

Calling this function multiple times will have no effect.

Retrieving the Server List

The server list for a game can be retrieved on both the client and server side. Both the client and server have access to the full list using GetServerList(). This function returns the most populated servers first.

Additionally, the client has access to GetFriendServers() which returns any listed servers their friends are playing on.

Common Patterns

Create a Match with a Lobby Only Friends Can Join

Last updated