nn::nex::MatchmakeExtensionClient::CreateMatchmakeSession Member Function

Syntax

qBool CreateMatchmakeSession(
     ProtocolCallContext * pContext,
     const GatheringHolder & matchmakingSession,
     GatheringID * gid,
     qVector< qByte > * pSessionKey,
     const String strMessage = _T("")
);

Parameters

Name Description
in pContext Call information.
in matchmakingSession The matchmaking session to be created. You cannot specify objects obtained by the AutoMatchmakeand BrowseMatchmakeSession functions.
out gid The ID of the created matchmaking session.
out pSessionKey Common key for P2P communication. The key length is Network::MAX_P2P_SIGNATURE_KEY_LEN bytes.
in strMessage Returns the message that notifies the gathering participants based on the settings. The maximum string length is specified by MATCHMAKE_STRING_MAX_LENGTH.

Return Values



Value Description
true Call initialization succeeded.
false Failure.

Description

Creates and joins a matchmaking session.

We recommend using the overload that takes CreateMatchmakeSessionParam as an argument. This function creates the specified matchmaking session, joins it, and then the local system becomes the owner and host. If asynchronous processing is successful, a gathering ID for the created matchmaking session and a common key generated by the game server for P2P communication are set. The common key is shared by all participants in a matchmaking session.

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, InvalidArgment): The string or buffer that was to be sent is too large. The matchmakingSession parameter is invalid. 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.

See Also

Network::SetP2PDataPacketSessionSignatureKey

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.
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/06/26
A common key for peer-to-peer communications is now returned when asynchronous processing is successful.
2011/01/27
Initial version.

CONFIDENTIAL