public async Task <GenericOutcome> StopMatchmaking(StopMatchBackfillRequest request) { var stopMatchmakingRequest = BackfillDataMapper.CreateBufferedStopMatchmakingRequest(request); var response = await SendAsync(stopMatchmakingRequest).ConfigureAwait(false); return(ParseHttpResponse(response)); }
public GenericOutcome StopMatchmaking(StopMatchBackfillRequest request) { if (!networkInitialized) { return(new GenericOutcome(new GameLiftError(GameLiftErrorType.NETWORK_NOT_INITIALIZED))); } return(sender.StopMatchmaking(request)); }
public GenericOutcome StopMatchmaking(StopMatchBackfillRequest request) { log.DebugFormat("Stopping matchmaking backfill for ticket={0}", request.TicketId); var stopMatchmaking = BackfillDataMapper.CreateBufferedStopMatchmakingRequest(request); var future = new TaskCompletionSource <GenericOutcome>(); var ackFunction = CreateAckFunction(future); return(EmitEvent(stopMatchmaking, ackFunction, future, STOP_MATCH_BACKFILL_ERROR)); }
// Ends the game session for all and disconnects the players public void TerminateGameSession() { System.Console.WriteLine("Terminating Game Session"); //Cleanup (not currently relevant as we just terminate the process) GameObject.FindObjectOfType <Server>().DisconnectAll(); this.gameStarted = false; // Stop the backfilling if (this.backfillTicketID != null) { System.Console.WriteLine("Stopping backfill"); var stopBackfill = new StopMatchBackfillRequest(); stopBackfill.TicketId = this.backfillTicketID; stopBackfill.MatchmakingConfigurationArn = this.matchmakerData.MatchmakingConfigurationArn; stopBackfill.GameSessionArn = GameLiftServerAPI.GetGameSessionId().Result; GameLiftServerAPI.StopMatchBackfill(stopBackfill); } // Terminate the process following GameLift best practices. A new one will be started automatically System.Console.WriteLine("Terminating process"); GameLiftServerAPI.ProcessEnding(); Application.Quit(); }
public GenericOutcome StopMatchmaking(StopMatchBackfillRequest request) { return(httpClientInvoker.StopMatchmaking(request).Result); }
/** * Submit a request to stop an outstanding request to backfill the current match. */ public static GenericOutcome StopMatchBackfill(StopMatchBackfillRequest request) { return(ServerState.Instance.StopMatchmaking(request)); }