Partager via


XblMatchmakingCreateMatchTicketAsync

Sends a matchmaking request to the server and returns the match ticket with a ticket id. Call XblMatchmakingCreateMatchTicketResult upon completion to get the result.

Syntax

HRESULT XblMatchmakingCreateMatchTicketAsync(  
         XblContextHandle xboxLiveContext,  
         XblMultiplayerSessionReference ticketSessionReference,  
         const char* matchmakingServiceConfigurationId,  
         const char* hopperName,  
         const uint64_t ticketTimeout,  
         XblPreserveSessionMode preserveSession,  
         const char* ticketAttributesJson,  
         XAsyncBlock* asyncBlock  
)  

Parameters

xboxLiveContext   _In_
Type: XblContextHandle

Xbox live context for the local user.

ticketSessionReference   _In_
Type: XblMultiplayerSessionReference

The multiplayer session to use for the match.

matchmakingServiceConfigurationId   _In_
Type: char*

The service configuration ID for the match.

hopperName   _In_
Type: char*

The name of the hopper.

ticketTimeout   _In_
Type: uint64_t

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

preserveSession   _In_
Type: XblPreserveSessionMode

Indicates if the session should be preserved.

ticketAttributesJson   _In_
Type: char*

The ticket attributes for the session. (Optional)

asyncBlock   _In_
Type: XAsyncBlock*

The AsyncBlock for this operation.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

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.

REST Call

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

Requirements

Header: matchmaking_c.h

Library: Microsoft.Xbox.Services.14x.GDK.C.lib

See also

matchmaking_c