DWC_TestInetAsync

Syntax

#include <dwc.h>
BOOL DWC_TestInetAsync(int timeout);

Arguments

timeout Timeout interval of the connection test (in milliseconds).
The default timeout interval of 3000 milliseconds is applied when a value equal to or less than 0 is specified.
The test cannot be conducted normally if the timeout interval is too short.

Return Values

TRUE Connection test started.
FALSE Failed to start connection test.
Specifically, one or more of the following conditions apply.
  • There is not enough memory for dynamic allocation inside the library.
  • A connection test is already running.
  • Not currently inside the interval between connecting to the Internet using the DWC_ConnectInetAsync function and disconnecting from the Internet using the DWC_CleanupInet or DWC_CleanupInetAsync function.

Description

Starts an Internet connection test by communicating with the connection test server.

If connected to a host for which Proxy settings have been made, note that there is a possibility of blocking for an extended time due to resolution of the connected hosts domain when this function is called the first time.
After the first call, there is no extended period of blocking because the IP address saved in a static region.

After calling this function, call DWC_TestInetProcess roughly every game frame to advance the connection test communication process until the process terminates. If this function is called during a connection test, it always returns FALSE.

Because the memory required at the beginning of the connection test is secured by this function, be sure to continue processing until the connection test communication process terminates and memory is automatically freed.

Because this function performs communications with the connection test server, do not call it repeatedly over a short period of time. Instead see the DWC_UpdateConnection function, which checks the connection status between the local host and an access point.

See Also

DWC_TestInetProcess
DWC_UpdateConnection
DWC_ConnectInetAsync
DWC_CleanupInet
DWC_CleanupInetAsync

Revision History

For the changelog prior to 5.1 PR2, click here.


CONFIDENTIAL