DWC_CloseConnectionHardFromServer

Syntax

#include <dwc.h>
int DWC_CloseConnectionHardFromServer(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.
-3 Function was called when the local host was not the server host.

Description

This function can be called only from the server host.

This function 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.

Other hosts are notified that their connections are being closed, and the close callback DWCConnectionClosedCallback is called on those hosts. However, because this close notification is sent only once over UDP communications, 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_CloseConnectionHardBitmapFromServer function, you can close all of the connections to multiple AIDs at the same time.

Revision History

For the changelog prior to 5.1 PR2, click here.


CONFIDENTIAL