qBool AutoMatchmake( ProtocolCallContext * pContext, const qList< GatheringID > gidList, const GatheringHolder & matchmakingSession, GatheringHolder * joinedMatchmakingSession, const String strMessage = _T("") );
Name | Description | |
---|---|---|
in | pContext | Call information. |
in | gidList | A list of gathering IDs for matchmaking sessions that the local station wants to join. The local station attempts to join these sessions in the order they are listed. |
in | matchmakingSession | The matchmaking session to create. If no joinable session is found, a gathering that has this information is created. |
out | joinedMatchmakingSession | The joined matchmaking session. |
in | strMessage | Returns the message that notifies the gathering owner or participants. The maximum string length is specified by MATCHMAKE_STRING_MAX_LENGTH . |
Value | Description |
---|---|
true | Call initialization succeeded. |
false | Failure. |
Joins the specified gathering.
We recommend using the overload that takes AutoMatchmakeParam
as an argument. Joins the matchmaking session (gathering) with the specified gathering ID. You can specify multiple gathering IDs, and the function attempts to join the matchmaking session that corresponds to each gathering ID, starting from the beginning of the list. The function returns the first matchmaking session that can be joined.
If the specified matchmaking session cannot be joined, the function creates a new matchmaking session based on the specified matchmaking session, joins the session, and makes the local system the host.
In contrast with the other AutoMatchmake
functions, this function does not remove the past three matchmaking sessions that were joined from the matchmaking sessions to attempt joining in.
Have the application search for a joinable session using the BrowseMatchmakeSession
function and then filtering the search results. Then use this function to join the matchmaking session or implement code that allows creating one. Note that in most cases you can achieve the same result by using the AutoMatchmake
function, which allows you to specify search conditions by appropriately specifying MatchmakeSessionSearchCriteria
. First, consider using the AutoMatchmake
function, which allows you to specify search conditions.
If you are also going to use this function, we strongly recommend that you implement code in such a way that matchmaking sessions are not unnecessarily created because the matchmaking session could not be joined (or another reason), and also so that multiple gathering IDs can be specified and the order of the list differs as much as possible for each client.
The asynchronous process might return the following results.
Pass the following error to the Error/EULA applet. This error must be removed during debugging.
QERROR(Core, InvalidArgument)
: The string or buffer that was to be sent is too large. MATCHMAKE_SYSTEM_TYPE_PERSISTENT_GATHERING
or MATCHMAKE_SYSTEM_TYPE_OLV_COMMUNITY
was specified for the matchmaking system type, but the gathering ID of the persistent gathering was not set as the 0th attribute or as a related persistent gathering ID.
QERROR(RendezVous, GameServerMaintenance)
: This error occurs when the function is called between the GameServerMaintenance
notification event and when game server maintenance takes place.
QERROR(Core, InvalidArgment)
to QERROR(Core, InvalidArgument)
and QERROR(Core, GameServerMaintenance)
to QERROR(RendezVous, GameServerMaintenance)
in the description.
QERROR(Core, InvalidArgment)
is not handled by the application, but the error is passed to the error/EULA applet. QERROR(Core, GameServerMaintenance)
is returned when the function is called between the GameServerMaintenance
notification event and when game server maintenance takes place.
CONFIDENTIAL