qBool AutoMatchmake( ProtocolCallContext * pContext, const GatheringHolder & matchmakingSession, GatheringHolder * joinedMatchmakingSession, const String strMessage = _T("") );
Name | Description | |
---|---|---|
in | pContext | Call information. |
in | matchmakingSession | The matchmaking session to be searched for and created. A search is made for the session within which information there are matches for GameMode , Attribute , and MatchmakeSystemType . If no matching 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. |
Automatically searches for and joins matchmaking sessions.
We recommend using the overload that takes AutoMatchmakeParam
as an argument. A search is made for a matchmaking session (gathering) from among the specified matchmaking session information. If a matchmaking session that matches the information is found, the station joins that session. If a matching session is not found, a matchmaking session is created, and the station joins that session and the local host becomes the host.
A search is made for a joinable session that matches all of the following:
・Game mode
・Minimum and maximum number of participants
・Matchmaking system type
・Search attributes
However, the three most recently joined matchmaking sessions are removed from the server as possible sessions to join. This helps prevent the problem of joining multiple times into the same matchmaking session, which can result from auto matchmaking even though a P2P connection cannot be established (because, for example, NAT traversal is not possible). The participant record on the server side becomes invalid after about one hour. If the local user is the creator of the matchmaking session, that system is not included in the participant record. Sessions that do not yet have a host for P2P communication are also excluded from the join targets. If you want to include matchmaking sessions without a host in the joinable sessions because, for example, P2P communication is not used, use the overload that takes MatchmakeSessionSearchCriteria
as a parameter and call MatchmakeSessionSearchCriteria::SetExcludeNonHostPid(false)
.
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.
MatchmakeSession
during a successful asynchronous process.CONFIDENTIAL