1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
8<title>DWC_TestInternetConnection</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__conntest_8h_182491a45372bdb50d8506a342b0be0b8"></a>
14<h1 align="left">DWC_TestInternetConnection</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE><a href=Macro.html#dwc__conntest_8h_19b2a4f07ca42debd525043023f96c8e2>DWCTestInetResult</a> <a href=DWC_TestInternetConnection.html#dwc__conntest_8h_182491a45372bdb50d8506a342b0be0b8>DWC_TestInternetConnection</a>(int timeout,
22                                             BOOL proxy);</CODE></PRE></dd>
23</dl>
24
25<h2>Arguments</h2>
26
27<TABLE border="1" width="100%">
28  <TBODY>
29
30    <TR>
31<TD width="13%"><EM><STRONG>timeout</STRONG></EM></TD>
32<TD width="87%">Timeout interval of the connection test (in milliseconds).<br>The default timeout interval of 3000 milliseconds is applied when a value equal to or less than 0 is specified.<br>The test cannot be conducted normally if the timeout interval is too short.</TD>
33    </TR>
34
35    <TR>
36<TD width="13%"><EM><STRONG>proxy</STRONG></EM></TD>
37<TD width="87%">Set to TRUE when proxy settings are used.</TD>
38    </TR>
39
40  </TBODY>
41</TABLE>
42
43<h2>Return Values</h2>
44
45<p>Result of the  connection test. All values other than <CODE><a href=Macro.html#dwc__conntest_8h_19b2a4f07ca42debd525043023f96c8e205ce0f066babd1a55d6a94f15f4bf4c7>DWC_TESTINET_SUCCEEDED</a></CODE> indicate failure.</p>
46
47<H2>Description</H2>
48<p>The function does not return processing until the connection test's communication is done.</p><p>This function communicates with <ulinkurl='http://conntest.nintendowifi.net/'><U>http://conntest.nintendowifi.net/</U></ulink> and determines whether the expected response can be obtained. It does not check the connectivity of communications for other ports or connectivity of UDP communications used for P2P communications.</p><p>Connectivity is determined by specific fields included in the response header from <U>conntest.nintendowifi.net</U>. As a result, when the test is performed using a proxy server, the content of the response header will be different and therefore will sometimes be treated as a failure.</p><p>A proxy server will use the value obtained with the <CODE>NCDGetCurrentIpConfig</CODE> function.</p><p>Because this function performs communications with the connection test server, do not call it repeatedly over a short period of time.</p><p>The duration set for the <CODE>timeout</CODE> argument specifies the timeout for waiting for a response from the connection test server. Thus, if you include the time required to complete initialization for communication, the actual time taken for control to return from the function may be longer than the time specified in the <CODE>timeout</CODE> argument.</p>
49
50<H2>Revision History</H2>
51<DL>
52
53<DT><para>1.4.12</DT>
54<DD>Created initial version.</DD>
55
56<DT><para>1.4.16</DT>
57<DD>Added a description related to timeouts.</DD>
58
59</DL>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62