nn::nex::Session::QuerySessions Member Function

Syntax

static qUnsignedInt QuerySessions(
     qList< SessionDescription > * pOutputList,
     qBool bFilterMatching = true,
     qUnsignedInt32 uiTimeout = 1000
);

Parameters

Name Description
out pOutputList Specifies a pointer to a list used to accept descriptors for sessions that have been found.
in bFilterMatching Specifies whether to enumerate sessions holding the same title (true by default).
in uiTimeout Specifies the timeout to use when searching for a session in units of milliseconds (1000 by default).

Return Values



Value Description
true Returned when the session search could be made correctly.
false Returned when the call could not execute. SYSTEMERROR_DC_CLUSTER_ALREADY_INITIALIZED is signaled when the station has already joined a session or already created one. SYSTEMERROR_GEN_INVALID_PARAMETER is signaled when a session descriptor could not be found.

Description

Searches for sessions on the LAN.

When connected using a socket, checks whether another process connected to the same access point has opened a session. Using this feature allows you to skip matchmaking operations through a server, and test P2P functionality that uses a socket.

Because this overloaded function executes synchronously, it does not return until the session is successfully joined. This function can be called asynchronously, at the timing of Scheduler::Dispatch when in user thread mode. To do so, use the overloaded function that specifies CallContext.

Note: This function was designed for debugging. Do not use this function in product releases.

See Also

JoinSession, CreateSession

Revision History

2012/01/27
Initial version.

CONFIDENTIAL