CTR Pia
4.11.3
Game Communication Engine
|
(For debugging.) This class handles dummy sessions for debugging. More...
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 NexDebugSession * | GetInstance () |
Gets a pointer to the NexDebugSession instance (singleton pattern). More... | |
(For debugging.) This class handles dummy sessions for debugging.
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.
[in] | createSessionSetting | Specifies the settings to use when creating the session. |
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. 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.
GetCreateDummySessionResult
, GetCreatedDummySessionId
,
|
static |
Creates an instance (singleton pattern).
Result
values is returned. You must make sure that the implementation of this function in your application does not return any errors. 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.
[in] | sessionId | The session ID for the dummy session that was deleted. |
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. 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.
|
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.
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.
Result
value for which the IsSuccess()
function returns true
. If this function call fails, one or more of the following Result
values is returned. 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.
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.
Result
value for which the IsSuccess()
function returns true
. If this function call fails, one or more of the following Result
values is returned. 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.
|
inlinestatic |
Gets a pointer to the NexDebugSession
instance (singleton pattern).
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.
Result
value for which the IsSuccess()
function returns true
. If this function call fails, one or more of the following Result
values is returned. 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.
bool nn::pia::inet::NexDebugSession::IsCompletedCreateDummySession | ( | ) |
and CreateDummySessionAsync
asynchronous processing.
This function checks the completion of asynchronous processes started with CreateDummySessionAsync
.
true
if the asynchronous process has completed, or false
otherwise. Also returns false
when there has been no asynchronous processing.bool nn::pia::inet::NexDebugSession::IsCompletedDestroyDummySession | ( | ) |
Checks the completion of DestroyDummySessionAsync
asynchronous processing.
This function checks the completion of asynchronous processes started with DestroyDummySessionAsync
.
true
if the asynchronous process has completed, or false
otherwise. Also returns false
when there has been no asynchronous processing.bool nn::pia::inet::NexDebugSession::IsCompletedUpdateDummySession | ( | ) |
Checks the completion of UpdateDummySessionAsync
asynchronous processing.
This function checks the completion of asynchronous processes started with UpdateDummySessionAsync
.
true
if the asynchronous process has completed, or false
otherwise. Also returns false
when there has been no asynchronous processing.Result nn::pia::inet::NexDebugSession::Startup | ( | ) |
Starts the NexDebugSession
function.
Call this after NexFacade::Bind
.
Result
values is returned. You must make sure that the implementation of this function in your application does not return any errors. 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.
[in] | sessionId | The session ID for the dummy session for which settings are updated. |
[in] | updateSessionSetting | Update settings for the session. |
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. 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.