DWC_CloseConnectionHard

C Specification

#include <dwc.h>

int DWC_CloseConnectionHard( u8 aid );

Description

Forces the connection with the specified AID to close. The close process completes within this function, and the callback function set with the DWC_SetConnectionClosedCallback function is called before exiting this function.

It remains logged-in to the Nintendo Wi-Fi Connection.

The other host is also notified of this close, and the close callback DWCConnectionClosedCallback is called on the other host. However, because this close notification is only sent once by UDP communications, it is possible, depending on the conditions of the connection, that the notification will not reach its destination.

Use this function to handle unusual situations—for example, closing the connection of a host when communication has become impossible because the host has been turned off.

If you use the DWC_CloseConnectionHardBitmap function, you can close the connection to multiple AIDs.

Arguments

aid AID of the host to close.

Return Values

0 Close operation complete
-1 No action taken because the connection has not been established or an error occurred.
-2 No action taken because an already closed AID was specified.

See Also

DWC_CloseAllConnectionsHard, DWC_CloseConnectionHardBitmap, DWC_SetConnectionClosedCallback, DWCConnectionClosedCallback

Revision History

12/16/2005 Added a detailed function description.
11/07/2005 Initial version.