qBool AutoMatchmake( ProtocolCallContext * pContext, const qList< MatchmakeSessionSearchCriteria > & searchCriteriaList, const GatheringHolder & matchmakingSession, GatheringHolder * joinedMatchmakingSession, const String strMessage = _T("") );
Name | Description | |
---|---|---|
in | pContext | Call information. |
in | searchCriteriaList | Search conditions. Search in order from the start of the list. |
in | matchmakingSession | The matchmaking session that is created when there is no match to the search conditions. |
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) based on the specified search conditions. If a search match is found, that session is joined. If there is no match to the search conditions, a new matchmaking session is created based on the specified matchmaking session information and the station joins that newly created session as the host.
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 host is the creator of the matchmaking session, that system is not included in the participant record.
When multiple search conditions are passed as a list, the game server conducts the search starting from the top of the list. (The search is ended when a session is joined.) In other words, you can search for matchmaking sessions as gradually easing your search conditions.
Sessions that are locked to participants or full are automatically excluded from the search. Up to two search criteria can be specified. If three or more are specified, a QERROR(Core, InvalidArgument)
occurs.
The asynchronous process might return the following results.
You can choose to either handle the following error in the application or pass it to the error/EULA applet.
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, 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, OutOfRatingRange)
: When MATCHMAKE_SELECTION_METHOD_BROADEN_RANGE
or MATCHMAKE_SELECTION_METHOD_BROADEN_RANGE_WITH_PROGRESS_SCORE
is set with the MatchmakeSessionSearchCriteria::SetSelectionMethod
function, the attributes of the MATCHMAKE_SESSION_BROADEN_RANGE_ATTRIBUTE_INDEX
index are out of range.
QERROR(Core, InvalidArgment)
to QERROR(Core, InvalidArgument)
in the description.
QERROR(Core, InvalidArgment)
to QERROR(Core, InvalidArgument)
and QERROR(Core, GameServerMaintenance)
to QERROR(RendezVous, GameServerMaintenance)
in the description.
QERROR(Core, InvalidArgument)
. Previously the function returned QERROR(PythonCore, Exception)
when 0 criteria were specified in searchCriteriaList, but now QERROR(Core, InvalidArgument)
is returned.
MatchmakeSessionSearchCriteria::SetExcludeNonHostPid
function.
QERROR(Core, InvalidArgment)
is not handled by the application, but the error is passed to the error/EULA applet. Also, when searching in a range, QERROR(RendezVous, OutOfRatingRange)
is now returned as an out-of-range error. QERROR(RendezVous, OutOfRatingRange)
is returned if an out-of-range value is set when using range broadening.QERROR(Core, InvalidArgment)
is returned if an out-of-range value is set when using range broadening.
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