nn::uds::CTR::DestroyNetwork Function

Syntax

nn::Result DestroyNetwork(
     void
);

Arguments

None.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
Result::IsSuccess Destroyed the network and transitioned to the STATE_DISCONNECTED state.
ResultNotInitialized The library is not initialized. Execute the Initialize function.
ResultInvalidState Not in an executable state. Returned when executed in a state other than master.
ResultWirelessOff Entered wireless-disabled mode. Re-initialization is required.
A value other than the above Failed for reasons other than those given above.

Description

Destroys the network.

All connected clients and spectators are released and the network is destroyed. Only the master can run this function. When you call this function, a disconnect-request packet is sent to clients and spectators and they immediately disconnect from the network. At this time, the GetConnectionStatus function gets DISCARDED_FROM_NETWORK as the reason for disconnection (DisconnectReason). However, depending on the communications environment, there may be times when the disconnect-request packet does not reach clients and spectators. When this is the case, they are disconnected roughly 1 second after this function has been called. In this case, the reason for disconnection is CONNECTION_LOST.

This function is thread-safe.

Revision History

2011/09/07
Standardized notation for wireless-disabled mode.
2011/03/08
Added a link to Initialize in Return Values.
2010/10/15
Expanded the information on the return values. Revised the Description to make it easier to understand.
2010/06/14
Initial version.

CONFIDENTIAL