game-common / pragma.gameinstance / GameInstanceHostPlugin / findHostForGameInstance /
findHostForGameInstance #
open suspend fun findHostForGameInstance(gameInstance: GameInstance.GameInstance, clientTokenFunction: () -> PartnerClientTokens): ExtHostRequest?
Called to prepare any custom data to be used by FleetPlugin.selectServerPool to help select a server pool for the game instance.
If you are not using Pragma’s fleet management capabilities, return null from this method and use this method to integrate with your game server provider in order to allocate a game server for this game instance.
Used by:
- GameInstanceService.createGameInstanceV1
Return #
An ExtHostRequest payload declaring any custom data to be used when determining a server pool, or null if you are not using Pragma’s fleet management capabilities.
Parameters #
gameInstance | The game instance needing a game server host. |
clientTokenFunction | A function to allocate partner client tokens for the game server to use when connecting to pragma. |