CTR Pia  4.11.3
Game Communication Engine
nn::pia::inet::NexDebugSession Class Reference

(For debugging.) This class handles dummy sessions for debugging. More...

+ Inheritance diagram for nn::pia::inet::NexDebugSession:

Public Member Functions

void Cleanup ()
 Cleans up the NexDebugSession feature. More...
 
Result CreateDummySessionAsync (const NexCreateSessionSetting &createSessionSetting)
 Builds a dummy session. More...
 
Result DestroyDummySessionAsync (u32 sessionId)
 Deletes a dummy session. More...
 
u32 GetCreatedDummySessionId () const
 Gets the session ID for the dummy session that was created. More...
 
Result GetCreateDummySessionResult () const
 Gets the result of CreateDummySessionAsync asynchronous processing. More...
 
Result GetDestroyDummySessionResult () const
 Gets the result of DestroyDummySessionAsync asynchronous processing. More...
 
Result GetUpdateDummySessionResult () const
 Gets the result of UpdateDummySessionAsync asynchronous processing. More...
 
bool IsCompletedCreateDummySession ()
 and CreateDummySessionAsync asynchronous processing. More...
 
bool IsCompletedDestroyDummySession ()
 Checks the completion of DestroyDummySessionAsync asynchronous processing. More...
 
bool IsCompletedUpdateDummySession ()
 Checks the completion of UpdateDummySessionAsync asynchronous processing. More...
 
Result Startup ()
 Starts the NexDebugSession function. More...
 
Result UpdateDummySessionAsync (u32 sessionId, const NexUpdateSessionSetting &updateSessionSetting)
 Updates dummy session settings. More...
 

Static Public Member Functions

static Result CreateInstance ()
 Creates an instance (singleton pattern). More...
 
static void DestroyInstance ()
 Destroys the instance (singleton pattern). More...
 
static NexDebugSessionGetInstance ()
 Gets a pointer to the NexDebugSession instance (singleton pattern). More...
 

Detailed Description

(For debugging.) This class handles dummy sessions for debugging.

Member Function Documentation

void nn::pia::inet::NexDebugSession::Cleanup ( )

Cleans up the NexDebugSession feature.

Call before NexFacade::Unbind.

Result nn::pia::inet::NexDebugSession::CreateDummySessionAsync ( const NexCreateSessionSetting createSessionSetting)

Builds a dummy session.

This function starts an asynchronous process that creates a dummy session. The local station becomes the host of the created dummy session. The clients cannot participate in a dummy session. The started process advances by periodically calling the nn::pia::common::Scheduler::Dispatch function. Use IsCompletedCreateDummySession to check whether the process has completed and GetCreateDummySessionResult to check the result. You can use GetCreatedDummySessionId to get the session ID of the constructed dummy session.

Parameters
[in]createSessionSettingSpecifies the settings to use when creating the session.
Returns
Returns a Result value that indicates success if the asynchronous process starts successfully. If this function call fails, one or more of the following Result values is returned.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that unexpected arguments were passed to the function when starting the asynchronous process. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that the instance was not in a valid state when the function was called. Make sure that no other asynchronous processes are running, that Startup has been called, and that Session::Startup is not called. Programming error. Fix your program so that this error is not returned.

See also
IsCompletedCreateDummySession, Checkes the completion of GetCreateDummySessionResult, GetCreatedDummySessionId,
static Result nn::pia::inet::NexDebugSession::CreateInstance ( )
static

Creates an instance (singleton pattern).

Returns
Returns the result of the function. If this function call fails, one or more of the following Result values is returned. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:

nn::pia::ResultNotInitialized Indicates that the inet module is not initialized. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that the function was called at the wrong time. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultAlreadyExists Indicates that an instance has already been created. Programming error. Fix your program so that this error is not returned.

Result nn::pia::inet::NexDebugSession::DestroyDummySessionAsync ( u32  sessionId)

Deletes a dummy session.

This function starts an asynchronous process that deletes a dummy session. The started process advances by periodically calling the nn::pia::common::Scheduler::Dispatch function. Use IsCompletedDestroyDummySession to check whether the process has completed and GetDestroyDummySessionResult to check the result.

Parameters
[in]sessionIdThe session ID for the dummy session that was deleted.
Returns
Returns a Result value that indicates success if the asynchronous process starts successfully. If this function call fails, one or more of the following Result values is returned.
Error Return Values:
nn::pia::ResultInvalidState Indicates that the instance was not in a valid state when the function was called. Make sure that no other asynchronous processes are running, that Startup has been called, and that Session::Startup is not called. Programming error. Fix your program so that this error is not returned.
See also
IsCompletedDestroyDummySession, GetDestroyDummySessionResult
static void nn::pia::inet::NexDebugSession::DestroyInstance ( )
static

Destroys the instance (singleton pattern).

This function does nothing and returns if calledwhen an instance has not been created.

u32 nn::pia::inet::NexDebugSession::GetCreatedDummySessionId ( ) const

Gets the session ID for the dummy session that was created.

Returns
Returns the session ID for the dummy session that was created.
Result nn::pia::inet::NexDebugSession::GetCreateDummySessionResult ( ) const

Gets the result of CreateDummySessionAsync asynchronous processing.

This function gets the results after an asynchronous process started by CreateDummySessionAsync ends.

Returns
Returns a Result value for which the IsSuccess() function returns true. If this function call fails, one or more of the following Result values is returned.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that unexpected arguments were passed to the function when starting the asynchronous process. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Attempted to construct 21 or more dummy sessions. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultGameServerMaintenance Indicates that the game server is under maintenance. If this error occurs during Internet communication, convert to a network error code and display in the error viewer applet/EULA applet. However, during local communication, do not display it as an error with error code in the error viewer applet/EULA applet. Execute up to the logout process from the NEX server.

nn::pia::ResultNexInternalError This is an internal NEX error. The nn::pia::util::NetworkErrorCodeConverter::Convert function gets a NEX network error code. Check the NEX section of the network error code list. After logging out, reinitialize Pia and NEX. If this error occurs during Internet communication, convert to a network error code and display in the error viewer applet/EULA applet. However, during local communication, do not display it as an error with error code in the error viewer applet/EULA applet. Handle appropriately in the application.

See also
CreateDummySessionAsync, IsCompletedCreateDummySession
Result nn::pia::inet::NexDebugSession::GetDestroyDummySessionResult ( ) const

Gets the result of DestroyDummySessionAsync asynchronous processing.

This function gets the results after an asynchronous process started by DestroyDummySessionAsync ends.

Returns
Returns a Result value for which the IsSuccess() function returns true. If this function call fails, one or more of the following Result values is returned.
Error Return Values:

nn::pia::ResultInvalidState Attempted to delete a session that was not the host. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultNotFound The session you tried to delete was not found. Handle appropriately in the application.

nn::pia::ResultNexInternalError This is an internal NEX error. The nn::pia::util::NetworkErrorCodeConverter::Convert function gets a NEX network error code. Check the NEX section of the network error code list. After logging out, reinitialize Pia and NEX. If this error occurs during Internet communication, convert to a network error code and display in the error viewer applet/EULA applet. However, during local communication, do not display it as an error with error code in the error viewer applet/EULA applet. Handle appropriately in the application.

See also
DestroyDummySessionAsync, IsCompletedDestroyDummySession
static NexDebugSession* nn::pia::inet::NexDebugSession::GetInstance ( void  )
inlinestatic

Gets a pointer to the NexDebugSession instance (singleton pattern).

Returns
Returns a NULL pointer if the instance cannot be created.
Result nn::pia::inet::NexDebugSession::GetUpdateDummySessionResult ( ) const

Gets the result of UpdateDummySessionAsync asynchronous processing.

This function gets the results after an asynchronous process started by UpdateDummySessionAsync ends.

Returns
Returns a Result value for which the IsSuccess() function returns true. If this function call fails, one or more of the following Result values is returned.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that unexpected arguments were passed to the function when starting the asynchronous process. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Attempted to update a session that was not the host. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultNotFound The session you tried to update was not found. Handle appropriately in the application.

nn::pia::ResultNexInternalError This is an internal NEX error. The nn::pia::util::NetworkErrorCodeConverter::Convert function gets a NEX network error code. Check the NEX section of the network error code list. After logging out, reinitialize Pia and NEX. If this error occurs during Internet communication, convert to a network error code and display in the error viewer applet/EULA applet. However, during local communication, do not display it as an error with error code in the error viewer applet/EULA applet. Handle appropriately in the application.

See also
UpdateDummySessionAsync, IsCompletedUpdateDummySession
bool nn::pia::inet::NexDebugSession::IsCompletedCreateDummySession ( )

and CreateDummySessionAsync asynchronous processing.

This function checks the completion of asynchronous processes started with CreateDummySessionAsync.

Returns
Returns true if the asynchronous process has completed, or false otherwise. Also returns false when there has been no asynchronous processing.
See also
CreateDummySessionAsync, GetCreateDummySessionResult
bool nn::pia::inet::NexDebugSession::IsCompletedDestroyDummySession ( )

Checks the completion of DestroyDummySessionAsync asynchronous processing.

This function checks the completion of asynchronous processes started with DestroyDummySessionAsync.

Returns
Returns true if the asynchronous process has completed, or false otherwise. Also returns false when there has been no asynchronous processing.
See also
DestroyDummySessionAsync, GetDestroyDummySessionResult
bool nn::pia::inet::NexDebugSession::IsCompletedUpdateDummySession ( )

Checks the completion of UpdateDummySessionAsync asynchronous processing.

This function checks the completion of asynchronous processes started with UpdateDummySessionAsync.

Returns
Returns true if the asynchronous process has completed, or false otherwise. Also returns false when there has been no asynchronous processing.
See also
UpdateDummySessionAsync, GetUpdateDummySessionResult
Result nn::pia::inet::NexDebugSession::Startup ( )

Starts the NexDebugSession function.

Call this after NexFacade::Bind.

Returns
Returns the result of the function. If this function call fails, one or more of the following Result values is returned. You must make sure that the implementation of this function in your application does not return any errors.
Error Return Values:
nn::pia::ResultInvalidState Indicates that the function was called at the wrong time. Create a NexFacade instance, and verify whether NexFacade::Bind is called. Programming error. Fix your program so that this error is not returned.
Result nn::pia::inet::NexDebugSession::UpdateDummySessionAsync ( u32  sessionId,
const NexUpdateSessionSetting updateSessionSetting 
)

Updates dummy session settings.

Starts asynchronous processing for updating dummy session settings. The started process advances by periodically calling the nn::pia::common::Scheduler::Dispatch function. Use IsCompletedUpdateDummySession to check whether the process has completed and GetUpdateDummySessionResult to check the result.

Parameters
[in]sessionIdThe session ID for the dummy session for which settings are updated.
[in]updateSessionSettingUpdate settings for the session.
Returns
Returns a Result value that indicates success if the asynchronous process starts successfully. If this function call fails, one or more of the following Result values is returned.
Error Return Values:
nn::pia::ResultInvalidState Indicates that the instance was not in a valid state when the function was called. Make sure that no other asynchronous processes are running, that Startup has been called, and that Session::Startup is not called. Programming error. Fix your program so that this error is not returned.
See also
IsCompletedUpdateDummySession, GetUpdateDummySessionResult