qBool CreateMatchmakeSession( ProtocolCallContext * pContext, const GatheringHolder & matchmakingSession, GatheringID * gid, qVector< qByte > * pSessionKey, const String strMessage = _T("") );
Name | Description | |
---|---|---|
in | pContext | Call information. |
in | matchmakingSession | The matchmaking session to be created. You cannot specify objects obtained by the AutoMatchmake and 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 . |
Value | Description |
---|---|
true | Call initialization succeeded. |
false | Failure. |
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.
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