nn::nex::MatchmakeExtensionClient::JoinMatchmakeSession Member Function

Syntax

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

Parameters

Name Description
in pContext Call information.
in gid ID of the matchmaking session to be joined.
out pSessionKey P2P session communication key. The key length is Network::MAX_P2P_SIGNATURE_KEY_LEN bytes.
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

Joins a matchmaking session.

We recommend using the overload that takes JoinMatchmakeSessionParam as an argument. The matchmaking session having the specified ID is joined. If joined successfully, the owner of the matchmaking session is notified of this event. If asynchronous processing is successful, a common key for P2P communication is set.

The following results may be returned as a result of asynchronous operation. Use the application to handle these results.

QERROR(RendezVous, SessionVoid): The matchmaking session does not exist.
QERROR(RendezVous, SessionFull): The session has already reached the maximum number of participants.
QERROR(RendezVous, SessionClosed): The matchmaking session is closed to new participants.
QERROR(RendezVous, NotFriend): Attempted to join a matchmaking session where the owner is not a friend of the local user. (Only occurs when MATCHMAKE_SYSTEM_TYPE_FRIEND is used.)
QERROR(RendezVous, DeniedByParticipants)
: The local station is on the blacklist of a participant in the matchmaking session.
QERROR(RendezVous, ParticipantInBlackList)
: A participant in the matchmaking session is on the local station's blacklist.

Pass the following error to the Error/EULA applet. This error must be removed during debugging.
QERROR(Core, InvalidArgument): An attempt was made to send a string longer than MATCHMAKE_STRING_MAX_LENGTH.

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/08
Corrected QERROR(Core, InvalidArgment) to QERROR(Core, InvalidArgument) and QERROR(Core, GameServerMaintenance) to QERROR(RendezVous, GameServerMaintenance) in the description.
2014/03/31
Changed the behavior so that QERROR(RendezVous, SessionClosed) is returned instead of QERROR(RendezVous, SessionVoid) when the system attempts to join a matchmaking session that is closed. Changed the functionality so that QERROR(RendezVous, NotFriend) is returned instead of QERROR(PythonCore, Exception) when MATCHMAKE_SYSTEM_TYPE_FRIEND is used and the local station attempts to join a matchmaking session where the owner is not a friend of the local user.
2013/11/28
Corrected the description so that QERROR(Core, InvalidArgument) is not handled by the application, but the error is passed to the error/EULA applet.
2013/07/12
Removed the option to specify whether to forcibly join a matchmaking session even if a participant who is registered in the local system's blacklist is participating in the session.
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.
2013/04/24
Fixed a bug where QERROR(RendezVous, SessionVoid) was not correctly returned in some cases.
2012/06/26
A common key for peer-to-peer communications is now returned when asynchronous processing is successful.
2011/10/24
Added the option to specify whether to forcibly join a matchmaking session even if a participant who is registered in the local system's blacklist is participating in the session.
2011/01/27
Initial version.

CONFIDENTIAL