Interface IGameLiftApiClient

Namespace
Unity.Multiplayer.Core

The slice of the GameLift service API GameLiftMatchAllocator needs: start a game session on an already-created fleet (mp-host's job -- build upload + fleet create, see docs/articles/hosting/gamelift.md), wait for it to activate, and reserve a player session once a seat is needed. The only seam between the allocator and the network, so NUnit mocks it directly instead of faking signed HTTP/JSON.

public interface IGameLiftApiClient

Methods

CreateGameSessionAsync(GameLiftCreateGameSessionRequest, CancellationToken)

Starts a game session on a fleet (or through an alias), for one match.

Task<GameLiftGameSession> CreateGameSessionAsync(GameLiftCreateGameSessionRequest request, CancellationToken cancellationToken = default)

Parameters

request GameLiftCreateGameSessionRequest
cancellationToken CancellationToken

Returns

Task<GameLiftGameSession>

CreatePlayerSessionAsync(string, string, string, CancellationToken)

Reserves a seat on a session for one player. playerData is an optional, arbitrary string GameLift stores with the reservation.

Task<GameLiftPlayerSession> CreatePlayerSessionAsync(string gameSessionId, string playerId, string playerData, CancellationToken cancellationToken = default)

Parameters

gameSessionId string
playerId string
playerData string
cancellationToken CancellationToken

Returns

Task<GameLiftPlayerSession>

DescribeGameSessionAsync(string, CancellationToken)

The session's current status and connection info.

Task<GameLiftGameSession> DescribeGameSessionAsync(string gameSessionId, CancellationToken cancellationToken = default)

Parameters

gameSessionId string
cancellationToken CancellationToken

Returns

Task<GameLiftGameSession>