nn::nex::Session Class

Syntax

class Session : private nn::nex::DuplicatedObject

Description

Encapsulates session operations.

It can be used for things such as creating or joining a session, or for setting information for a session. The session class is a singleton and can create only one instance. This instance is created by NetZ. Therefore, if you want to leave a session and create and join a new session, you must destroy the NetZ object first, and then create a different, new NetZ object.

The Session class itself is handled as a duplicated object. The duplication master for the Session class becomes the session master. Whether a station acts as a session master can be found using the DuplicatedObject::IsADuplicationMaster function. Also, stations acting as a session master can be obtained using the DuplicatedObject::GetMasterStation function. If a master maintaining a Session object leaves a session, a fault tolerance automatically occurs. (For details, see the NEX Programming Manual.)

typedef Definitions

JoinSessionOperationCallback Callback for determining if a session can be joined.

Member Functions

Session Automatically creates an instance of the Session class. Users should not call this constructor.
V ~Session Automatically destroys an instance of the Session class. Users should not call this destructor.
V OperationBegin Called every time a duplicated object system operation is started.
V OperationEnd Called every time a duplicated object system operation ends.
GetSessionName Gets the name of the session.
SetUserDefinedState Sets a user-defined value.
GetUserDefinedState Gets a user-defined value.
DestroySession Leaves the session forcibly without performing fault processing, when disconnected from the network.
CheckGameIsOver Gets whether the Net-Z session has ended.
GameOver Notifies all session participants that the session is over.
V Trace Traces the state of this duplicated object. (Used in debugging.)
GetNumOfRoutingConnections Gets the overall number of communication connections using the master in the session.
S GetInstanceHandle Gets the duplicated object handle of the Session object.
S GetInstance Gets an instance of a session object.
S GetRole Gets the role of the session object.
S RegisterJoinApprovalCallback Sets callback to determine whether a session can be joined.
S CreateSession Creates a session.
S JoinSession Joins a session.
S QuerySessions Searches for sessions on the LAN.
S CreateOrJoinSession Tries to join an existing session, or creates a new session if no sessions are found.
S GetLocalSessionDescription Gets a pointer to the session descriptor of the local station.
S SetSyncStationListInterval Sets the interval at which the session master reports the number of stations, which is used for detecting station inconsistencies.
S GetSyncStationListInterval Gets the interval at which the session master reports the number of stations, which is used for detecting station inconsistencies.
S SetDetectStationInconsitencyThresholdCount Specifies a threshold for the number of times to check before detecting station inconsistencies.
S GetDetectStationInconsitencyThresholdCount Gets the threshold for the number of times to check before detecting station inconsistencies.

Class Hierarchy

nn::nex::DuplicatedObject
  nn::nex::Session

Revision History

2011/01/27
Initial version.

CONFIDENTIAL