nn::nex::Session::CreateSession Member Function

Syntax

static qBool CreateSession(
     const qChar * szSessionName = NULL,
     qBool bNetworked = true
);

Parameters

Name Description
in szSessionName Specifies the session name (NULL by default).
in bNetworked Sets whether the session supports the network. Normally specify true (the default).

Return Values



Value Description
true Returned if the session was successfully created.
false Returned if some type of error occurred.
SYSTEMERROR_DC_CLUSTER_REDEFINITION is signaled when the session has already been built.
SYSTEMERROR_OBJDUP_WKHANDLE_NOT_INITIALIZED is signaled when an existing, defined object has not been initialized.
When the UDS client calls this function, an assert error occurs or false is returned.

Description

Creates a session.

The station calling this function becomes the session master.The session name is determined based on the name specified for szSessionName. This name is used to identify a session during product debugging when a station participating in a session calls the QuerySessions function.

bNetworked is a Boolean that defines whether the session supports the network. When the bNetwork parameter is false, other players cannot join the session. In addition, the session is not enumerated by the call to the Session::QuerySessions function. Can be used to implement single player mode with network-supporting code.

When a local communication session is created, the UDS network master becomes the session master. If a UDS client calls this function, an assertion error is generated or false is returned.

For Internet communication, before calling this function, a signature key distributed from the game server must be set by using the Network::SetP2PDataPacketSessionSignatureKey function.

Revision History

2012/09/04
Added that if a UDS client calls this function, an assertion error is generated or false is returned.
2012/01/26
Initial version.

CONFIDENTIAL