DWC_CloseConnectionHard

Syntax

#include <dwc.h>

int DWC_CloseConnectionHard(u8 aid);

Arguments

aid AID of the host to close.

Return Values

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

Description

Forcibly closes the connection with the specified AID. The close process completes within this function. The callback function set with the DWC_SetConnectionClosedCallback function is called before this function exits.

This host remains logged in to the Nintendo Wi-Fi Connection service.

The other host is notified of this closing and it calls the close callback DWCConnectionClosedCallback. However, because this close notification is only sent once over UDP, the notification may not reach its destination depending on connection conditions.

Use this function to handle unusual situations. For example, you can close the connection of a host if communication has become impossible because that host has been turned off.

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

Revision History


CONFIDENTIAL