1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21
22      span.virtual_style
23      {
24        font-size			 : 8pt;
25        color				 : white;
26        font-weight			: bold;
27        background			: #0a0;
28        border-left			: solid 1px #0f0;
29        border-top			: solid 1px #0f0;
30        border-right		: solid 1px #060;
31        border-bottom		: solid 1px #060;
32        padding-left		: 2px;
33        padding-right		: 2px;
34      }
35
36      span.protected_style
37      {
38        font-size			 : 8pt;
39        color				 : white;
40        font-weight			: bold;
41        background			: #444;
42        border-left			: solid 1px #ccc;
43        border-top			: solid 1px #ccc;
44        border-right		: solid 1px #222;
45        border-bottom		: solid 1px #222;
46        padding-left		: 2px;
47        padding-right		: 2px;
48      }
49        --></style>
50<title>nn::http::Connection</title>
51  </head>
52  <body>
53<h1><CODE>nn::http::Connection</CODE> Class</h1>
54<h2>Syntax</h2>
55    <div class="section">
56      <pre class="definition">class Connection : private ADLFireWall::NonCopyable<Connection></pre>
57    </div>
58<h2>Description</h2>
59    <div class="section">
60<p>Class that represents HTTP communication. A single instance of this class is used for a <I>single HTTP communication session with a single URL</I>.</p><!-- write here --></div>
61    <a name="function" id="function">
62<h2>Member Functions</h2>
63      <div class="section">
64        <table class="members">
65          <tr>
66<th class="category" colspan="3">Initialization/Finalization</th>
67          </tr>
68          <tr>
69            <td width="100">  </td>
70            <th>
71<a href="../../../nn/http/Connection/Connection.html"><CODE>Connection</CODE></a>
72            </th>
73<td>Constructor.</td>
74          </tr>
75          <tr>
76<td width="100"> <span class="virtual_style" title="virtual">V</span>
77            </td>
78            <th>
79<a href="../../../nn/http/Connection/~Connection.html"><CODE>~Connection</CODE></a>
80            </th>
81<td>Destructor.</td>
82          </tr>
83          <tr>
84            <td width="100">  </td>
85            <th>
86<a href="../../../nn/http/Connection/Initialize.html"><CODE>Initialize</CODE></a>
87            </th>
88<td>Initializes a <a href="../../../nn/http/Connection/Overview.html">Connection</a> and assigns a URL and method to it.</td>
89          </tr>
90          <tr>
91            <td width="100">  </td>
92            <th>
93<a href="../../../nn/http/Connection/Finalize.html"><CODE>Finalize</CODE></a>
94            </th>
95<td>Finalizes communication. Call this function after <a href="../../../nn/http/Connection/Initialize.html"><CODE>Initialize</CODE></a> is called and after all HTTP operations with the communication target have completed.<br />(This function does not need to be called for instances where <a href="../../../nn/http/Connection/Initialize.html"><CODE>Initialize</CODE></a> was not run. Although no problems result if it is called, it does nothing.)<br />Once this function has been called on a given <a href="../../../nn/http/Connection/Overview.html"><CODE>Connection</CODE></a> instance, it is no longer possible to use that instance to retrieve information from the communication target.<br /></td>
96          </tr>
97          <tr>
98<th class="category" colspan="3">Communications Settings</th>
99          </tr>
100          <tr>
101            <td width="100">  </td>
102            <th>
103<a href="../../../nn/http/Connection/SetProxy.html"><CODE>SetProxy</CODE></a>
104            </th>
105<td>Sets the proxy server to use for the connection.</td>
106          </tr>
107          <tr>
108            <td width="100">  </td>
109            <th>
110<a href="../../../nn/http/Connection/SetBasicAuthorization.html"><CODE>SetBasicAuthorization</CODE></a>
111            </th>
112<td>Sets the information used for basic authentication.</td>
113          </tr>
114          <tr>
115            <td width="100">  </td>
116            <th>
117<a href="../../../nn/http/Connection/SetSocketBufferSize.html"><CODE>SetSocketBufferSize</CODE></a>
118            </th>
119<td>Sets the size of the TCP receive buffer used by sockets during communication.</td>
120          </tr>
121          <tr>
122<th class="category" colspan="3">Communication Control</th>
123          </tr>
124          <tr>
125            <td width="100">  </td>
126            <th>
127<a href="../../../nn/http/Connection/Connect.html"><CODE>Connect</CODE></a>
128            </th>
129<td>Starts a connection with the communication target. (This is the synchronous version of the function. In other words, if the maximum number of HTTP sessions are already in use, the function blocks until one of those sessions concludes.)</td>
130          </tr>
131          <tr>
132            <td width="100">  </td>
133            <th>
134<a href="../../../nn/http/Connection/ConnectAsync.html"><CODE>ConnectAsync</CODE></a>
135            </th>
136<td>Starts a connection with the communication target. (This is the asynchronous version of the function. In other words, if the maximum number of HTTP sessions are already in use by the device, this function returns an error.」)</td>
137          </tr>
138          <tr>
139            <td width="100">  </td>
140            <th>
141<a href="../../../nn/http/Connection/Cancel.html"><CODE>Cancel</CODE></a>
142            </th>
143<td>Cancels the connection. The function does nothing and returns <CODE>ResultSuccess</CODE> when the connection has already been closed (including due to an error) or has already been canceled.</td>
144          </tr>
145          <tr>
146            <td width="100">  </td>
147            <th>
148<a href="../../../nn/http/Connection/GetStatus.html"><CODE>GetStatus</CODE></a>
149            </th>
150<td>Gets the connection status. (See the definitions in <a href="../../../nn/http/Status.html"><CODE>nn::http::Status</CODE></a> for information about the statuses that can be obtained.)</td>
151          </tr>
152          <tr>
153            <td width="100">  </td>
154            <th>
155<a href="../../../nn/http/Connection/GetError.html"><CODE>GetError</CODE></a>
156            </th>
157<td>Gets errors that occurred during communication. (The value that is obtained indicates the last error that occurred. See the definitions in <a href="../../../nn/http/ResultCode.html"><CODE>nn::http::ResultCode</CODE></a> for information about the statuses that can be obtained.)</td>
158          </tr>
159          <tr>
160            <td width="100">  </td>
161            <th>
162<a href="../../../nn/http/Connection/GetProgress.html"><CODE>GetProgress</CODE></a>
163            </th>
164<td>Gets the progress of an operation to receive an HTTP response's message body data.</td>
165          </tr>
166          <tr>
167<th class="category" colspan="3">Receiving Responses</th>
168          </tr>
169          <tr>
170            <td width="100">  </td>
171            <th>
172<a href="../../../nn/http/Connection/Read.html"><CODE>Read</CODE></a>
173            </th>
174<td>Reads an HTTP response.</td>
175          </tr>
176          <tr>
177            <td width="100">  </td>
178            <th>
179<a href="../../../nn/http/Connection/GetHeaderField.html"><CODE>GetHeaderField</CODE></a>
180            </th>
181<td>Gets the field value that matches the specified label. This field value is obtained from the message header of the HTTP response that was received.</td>
182          </tr>
183          <tr>
184            <td width="100">  </td>
185            <th>
186<a href="../../../nn/http/Connection/GetHeaderAll.html"><CODE>GetHeaderAll</CODE></a>
187            </th>
188<td>Gets the message header for the HTTP response that was received.</td>
189          </tr>
190          <tr>
191            <td width="100">  </td>
192            <th>
193<a href="../../../nn/http/Connection/GetStatusCode.html"><CODE>GetStatusCode</CODE></a>
194            </th>
195<td>Gets the status code for the HTTP response that was received.</td>
196          </tr>
197          <tr>
198<th class="category" colspan="3">Setting Outgoing Data (HTTP Request Headers, POST)</th>
199          </tr>
200          <tr>
201            <td width="100">  </td>
202            <th>
203<a href="../../../nn/http/Connection/AddHeaderField.html"><CODE>AddHeaderField</CODE></a>
204            </th>
205<td>Adds a field to the message header to be sent through an HTTP request.</td>
206          </tr>
207          <tr>
208            <td width="100">  </td>
209            <th>
210<a href="../../../nn/http/Connection/AddPostDataAscii.html"><CODE>AddPostDataAscii</CODE></a>
211            </th>
212<td>Function used to configure POST data before <a href="../../../nn/http/Connection/Connect.html"><CODE>Connect</CODE></a>ing (for ASCII strings).</td>
213          </tr>
214          <tr>
215            <td width="100">  </td>
216            <th>
217<a href="../../../nn/http/Connection/AddPostDataBinary.html"><CODE>AddPostDataBinary</CODE></a>
218            </th>
219<td>Function used to configure binary POST data before <a href="../../../nn/http/Connection/Connect.html"><CODE>Connect</CODE></a>ing.</td>
220          </tr>
221          <tr>
222            <td width="100">  </td>
223            <th>
224<a href="../../../nn/http/Connection/AddPostDataRaw.html"><CODE>AddPostDataRaw</CODE></a>
225            </th>
226<td>Function used to configure raw POST data before <a href="../../../nn/http/Connection/Connect.html"><CODE>Connect</CODE></a>ing.</td>
227          </tr>
228          <tr>
229            <td width="100">  </td>
230            <th>
231<a href="../../../nn/http/Connection/SetLazyPostDataSetting.html"><CODE>SetLazyPostDataSetting</CODE></a>
232            </th>
233<td>Sets the &quot;lazy&quot; (delayed) POST data configuration mode. (Here, &quot;lazy mode&quot; refers to the mode used to specify data after <a href="../../../nn/http/Connection/Connect.html"><CODE>Connect</CODE></a> is called.) </td>
234          </tr>
235          <tr>
236            <td width="100">  </td>
237            <th>
238<a href="../../../nn/http/Connection/NotifyFinishSendPostData.html"><CODE>NotifyFinishSendPostData</CODE></a>
239            </th>
240<td>In &quot;lazy&quot; (delayed) POST data configuration mode, sends notification that all POST data configuration is complete.</td>
241          </tr>
242          <tr>
243            <td width="100">  </td>
244            <th>
245<a href="../../../nn/http/Connection/SetPostDataEncoding.html"><CODE>SetPostDataEncoding</CODE></a>
246            </th>
247<td>Sets the encoding type for an HTTP request's POST data.</td>
248          </tr>
249          <tr>
250            <td width="100">  </td>
251            <th>
252<a href="../../../nn/http/Connection/SendPostDataAscii.html"><CODE>SendPostDataAscii</CODE></a>
253            </th>
254<td>Function used to set POST data (as ASCII strings) in &quot;lazy&quot; (delayed) POST data configuration mode.</td>
255          </tr>
256          <tr>
257            <td width="100">  </td>
258            <th>
259<a href="../../../nn/http/Connection/SendPostDataBinary.html"><CODE>SendPostDataBinary</CODE></a>
260            </th>
261<td>Function used to set POST data (as binary data) in &quot;lazy&quot; (delayed) POST data configuration mode.</td>
262          </tr>
263          <tr>
264            <td width="100">  </td>
265            <th>
266<a href="../../../nn/http/Connection/SendPostDataRaw.html"><CODE>SendPostDataRaw</CODE></a>
267            </th>
268<td>Function used to set POST data (as raw data) in &quot;lazy&quot; (delayed) POST data configuration mode.</td>
269          </tr>
270          <tr>
271<th class="category" colspan="3">HTTPS Configuration</th>
272          </tr>
273          <tr>
274            <td width="100">  </td>
275            <th>
276<a href="../../../nn/http/Connection/SetRootCa.html"><CODE>SetRootCa</CODE></a>
277            </th>
278<td>Sets the CA certificate. Call this function multiple times to set multiple certificates.</td>
279          </tr>
280          <tr>
281            <td width="100">  </td>
282            <th>
283<a href="../../../nn/http/Connection/SetRootCaStore.html"><CODE>SetRootCaStore</CODE></a>
284            </th>
285<td>Sets the CA certificate store. (Use this to reuse the same set of CA certificates with multiple HTTPS communication sessions. Do not release the configured certificate store during HTTPS communication with the communication targets.</td>
286          </tr>
287          <tr>
288            <td width="100">  </td>
289            <th>
290<a href="../../../nn/http/Connection/SetClientCert.html"><CODE>SetClientCert</CODE></a>
291            </th>
292<td>Sets a client certificate based on certificate and private key data.</td>
293          </tr>
294          <tr>
295            <td width="100">  </td>
296            <th>
297<a href="../../../nn/http/Connection/GetSslError.html"><CODE>GetSslError</CODE></a>
298            </th>
299<td>Gets errors that occurred during SSL communication. (Error codes are represented as <a href="../../../nn/ssl/ResultCode.html"><CODE>nn::ssl::ResultCode</CODE></a> values. The obtained value is the error code for the most recent error that occurred before this function was called.)</td>
300          </tr>
301          <tr>
302            <td width="100">  </td>
303            <th>
304<a href="../../../nn/http/Connection/SetVerifyOption.html"><CODE>SetVerifyOption</CODE></a>
305            </th>
306<td>Sets options that relate to SSL server verification.<br />※ The authentication operations below are defined in the <CODE><a href="../../../nn/ssl/VerifyOption.html">nn::ssl::VerifyOption</a></CODE> enumerated type and implemented by default.<br />・<CODE>CommonName</CODE> authentication (<CODE>nn::ssl::VERIFY_COMMON_NAME</CODE>)<br />・<CODE>RootCA</CODE> authentication (<CODE>nn::ssl::VERIFY_ROOT_CA</CODE>)<br />・<CODE>SubjectAlternativeName</CODE> authentication (<CODE>nn::ssl::VERIFY_SUBJECT_ALT_NAME</CODE>)<br /></td>
307          </tr>
308          <tr>
309            <td width="100">  </td>
310            <th>
311<a href="../../../nn/http/Connection/DisableVerifyOptionForDebug.html"><CODE>DisableVerifyOptionForDebug</CODE></a>
312            </th>
313<td>Removes the SSL communication verification contents for the specified bits.</td>
314          </tr>
315          <tr>
316            <td width="100">  </td>
317            <th>
318<a href="../../../nn/http/Connection/SetRootCaDefault.html"><CODE>SetRootCaDefault</CODE></a>
319            </th>
320<td><B>[<I>Deprecated</I>]</B> This function will be eliminated in the future. Sets to use the device's default internal certificate as the CA certificate.</td>
321          </tr>
322          <tr>
323            <td width="100">  </td>
324            <th>
325<a href="../../../nn/http/Connection/SetClientCertDefault.html"><CODE>SetClientCertDefault</CODE></a>
326            </th>
327<td><B>[<I>Deprecated</I>]</B> This function will be eliminated in the future. Sets to use the device's default internal client certificate as the client certificate.</td>
328          </tr> </table>
329      </div>
330    </a>
331<h2>Class Hierarchy</h2>
332    <div class="section">
333<p class="hierarchy"><span>ADLFireWall::NonCopyable</span><br />  <b>nn::http::Connection</b>
334      </p>
335    </div>
336<h2>Revision History</h2>
337    <div class="section">
338      <dl class="history">
339        <dt>2010/06/14</dt>
340<dd>Initial version.<br />
341        </dd>
342      </dl>
343    </div>
344  <hr><p>CONFIDENTIAL</p></body>
345</html>