Edit

Share via


MatchmakingService.CreateMatchTicketAsync Method

Definition

Sends a matchmaking request to the server and returns the match ticket with a ticket id.

public Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Matchmaking.CreateMatchTicketResponse> CreateMatchTicketAsync (Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference ticketSessionReference, string matchmakingServiceConfigurationId, string hopperName, Windows.Foundation.TimeSpan ticketTimeout, Microsoft.Xbox.Services.Matchmaking.PreserveSessionMode preserveSession, string ticketAttributesJson);
abstract member CreateMatchTicketAsync : Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference * string * string * Windows.Foundation.TimeSpan * Microsoft.Xbox.Services.Matchmaking.PreserveSessionMode * string -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Matchmaking.CreateMatchTicketResponse>
override this.CreateMatchTicketAsync : Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference * string * string * Windows.Foundation.TimeSpan * Microsoft.Xbox.Services.Matchmaking.PreserveSessionMode * string -> Windows.Foundation.IAsyncOperation<Microsoft.Xbox.Services.Matchmaking.CreateMatchTicketResponse>
Public Function CreateMatchTicketAsync (ticketSessionReference As MultiplayerSessionReference, matchmakingServiceConfigurationId As String, hopperName As String, ticketTimeout As TimeSpan, preserveSession As PreserveSessionMode, ticketAttributesJson As String) As IAsyncOperation(Of CreateMatchTicketResponse)

Parameters

ticketSessionReference
MultiplayerSessionReference

The multiplayer session to use for the match.

matchmakingServiceConfigurationId
String

The service configuration ID for the match.

hopperName
String

The name of the hopper.

ticketTimeout
Windows.Foundation.TimeSpan

The maximum time to wait for players to join the session.

preserveSession
PreserveSessionMode

Indicates if the session should be preserved.

ticketAttributesJson
String

The ticket attributes for the session. (Optional)

Returns

Windows.Foundation.IAsyncOperation<CreateMatchTicketResponse>

The async object for notifying when the operation is completed. With the handler, a new match ticket object is returned. The match ticket object contains server returned information such as ticket id and wait time, and also contains copies of the title specified data from the ticket data object.

Implements

Microsoft.Xbox.Services.Matchmaking.__IMatchmakingServicePublicNonVirtuals.CreateMatchTicketAsync(Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference,System.String,System.String,Windows.Foundation.TimeSpan,Microsoft.Xbox.Services.Matchmaking.PreserveSessionMode,System.String)

Remarks

Calls V103 POST /serviceconfigs/{serviceConfigId}/hoppers/{hopperName}

Applies to