game-common / pragma.gameinstance / GameServerProviderPlugin / startAllocationForGameInstance /

startAllocationForGameInstance #

abstract suspend fun startAllocationForGameInstance(gameInstanceId: <ERROR CLASS>, ext: ExtAllocateGameServer, clientTokenFunction: () -> PartnerClientTokens, gameServerVersion: <ERROR CLASS>, gameServerZone: <ERROR CLASS>)

Invoked when GameInstance.GameInstance.allocateGameServer is called on a game instance in the GameInstancePlugin. Used to send a request to a game server hosting provider to allocate a game server. The game server must use the Pragma SDK to call MatchApi::RequestStartGame() with the gameInstanceId to complete the allocation.

Parameters #

gameInstanceId

The unique id of the game instance.

ext

A customisable proto for parameters needed to call the game server hosting provider.

clientTokenFunction

A function to allocate partner client tokens for the game server to use when connecting to pragma.

gameServerVersion

The version of the game server.

gameServerZone

The zone of the game server.