nn::nex::MatchmakeExtensionClient::AutoMatchmake Member Function

Syntax

qBool AutoMatchmake(
     ProtocolCallContext * pContext,
     const GatheringHolder & matchmakingSession,
     GatheringHolder * joinedMatchmakingSession,
     const String strMessage = _T("")
);

Parameters

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.

Return Values



Value Description
true Call initialization succeeded.
false Failure.

Description

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.

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.

Revision History

2014/04/10
Changed "community" to "persistent gathering."
2014/04/08
Corrected QERROR(Core, InvalidArgment) to QERROR(Core, InvalidArgument) and QERROR(Core, GameServerMaintenance) to QERROR(RendezVous, GameServerMaintenance) in the description.
2014/03/11
Added a note indicating that the search results are limited to sessions that have a host for P2P communication.
2013/11/28
Corrected the description so that QERROR(Core, InvalidArgment) is not handled by the application, but the error is passed to the error/EULA applet.
2013/05/31
Added a note indicating that QERROR(Core, GameServerMaintenance) is returned when the function is called between the GameServerMaintenance notification event and when game server maintenance takes place.
2012/09/18
The reference stated that searches cannot be made based on the maximum number of participants, but CTR_NEX 2.0 has been revised to allow such searches. This statement was deleted.
2012/07/20
The communication key for the peer-to-peer session is now set in MatchmakeSession during a successful asynchronous process.
2010/06/03
Initial version.

CONFIDENTIAL