XblMultiplayerManagerFindMatch
Submits a matchmaking request to the server.
Syntax
HRESULT XblMultiplayerManagerFindMatch(
const char* hopperName,
const char* attributesJson,
uint32_t timeoutInSeconds
)
Parameters
hopperName _In_z_
Type: char*
The name of the hopper for this request.
attributesJson _In_opt_z_
Type: char*
Optional. The attributes of the match ticket for this request, as a JSON string.
timeoutInSeconds _In_
Type: uint32_t
The maximum time, in seconds, to wait for users to join the match.
Return value
Type: HRESULT
HRESULT return code for this API operation.
Remarks
This function submits a matchmaking request for the lobby session to Multiplayer Manager (MPM). Before you can use this function, you must first configure hoppers in the service configuration for your title. A hopper defines the rules that SmartMatch uses to match players. For more information about hoppers, see Matchmaking overview. If a lobby session doesn't exist, likely because XblMultiplayerManagerInitialize wasn't called, or if local users weren't added to the lobby session before calling this function, an error occurs. An error also occurs if matchmaking is already in progress.
The result of this function is delivered as a multiplayer event with an event type set to XblMultiplayerEventType::FindMatchCompleted
. You can call XblMultiplayerManagerDoWork to retrieve multiplayer events.
Requirements
Header: multiplayer_manager_c.h
Library: Microsoft.Xbox.Services.14x.GDK.C.lib
See also
multiplayer_manager_c
XblMultiplayerManagerEstimatedMatchWaitTime