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<title>Read</title>
8  </head>
9  <body>
10<h1><CODE>nn::ssl::Connection::Read</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14<a href="../../../nn/Result/Overview.html">nn::Result</a> Read(
15     u8 * pDataBuf,
16     size_t dataBufSize,
17     size_t * pReadSizeCourier = NULL
18);
19</pre>
20    </div>
21<h2>Arguments</h2>
22    <div class="section">
23      <table class="arguments">
24        <thead>
25          <tr>
26            <td width="15" />
27<th>Name</th>
28<td>Description</td>
29          </tr>
30        </thead>
31        <tr>
32<td>out</td>
33<th>pDataBuf</th>
34<td>Buffer storing the data.</td>
35        </tr>
36        <tr>
37<td>in</td>
38<th>dataBufSize</th>
39<td>Size of <SPAN class="argument">pDataBuf</SPAN>.</td>
40        </tr>
41        <tr>
42<td>out</td>
43<th>pReadSizeCourier</th>
44<td>Buffer storing the size of data already read. (May be omitted if the size of data already read is not needed.)</td>
45        </tr> </table>
46    </div>
47<h2>Return Values</h2>
48<div class="section">Returns the function's execution result. Returns one of the <a href="../../../nn/Result/Overview.html"><CODE>Result</CODE></a> values listed below. <br />
49      <table class="arguments">
50        <thead>
51          <tr>
52<th>Value</th>
53<td>Description</td>
54          </tr>
55        </thead>
56        <tr>
57<th><CODE>ResultSuccess</CODE></th>
58<td>Process was successful.</td>
59        </tr>
60        <tr>
61<th>ResultSocketZeroReturn</th>
62<td>Indicates that the receive function (<CODE><a href="../../../nn/socket/Read.html">nn::socket::Read</a></CODE>, etc.) returned 0. Returned if the SSL connection was closed by the server. This can occur, for example, when all data has been read.</td>
63        </tr>
64        <tr>
65<th>ResultProtocolFailedErr</th>
66<td>Error due to SSL protocol failure. To reconnect, first call the <a href="../../../nn/ssl/Connection/Overview.html"><CODE>Connection</CODE></a> class's <a href="../../../nn/ssl/Finalize.html"><CODE>Finalize</CODE></a> function, and then call <a href="../../../nn/ssl/Connection/Initialize.html"><CODE>Initialize</CODE></a> again.</td>
67        </tr>
68        <tr>
69<th>ResultWantRead</th>
70<td>Indicates, when an asynchronous socket was being used, that the receive function (<CODE><a href="../../../nn/socket/Read.html">nn::socket::Read</a></CODE>, etc.) returned without waiting for the operation to complete. Please try again.</td>
71        </tr>
72        <tr>
73<th>ResultSystemCallErr</th>
74<td>Indicates that the library function being used internally (mostly the socket functions) returned an unexpected error. (There was an abnormal response from the server, etc.) To reconnect, first call the <a href="../../../nn/ssl/Connection/Overview.html"><CODE>Connection</CODE></a> class's <a href="../../../nn/ssl/Finalize.html"><CODE>Finalize</CODE></a> function, and then call <a href="../../../nn/ssl/Connection/Initialize.html"><CODE>Initialize</CODE></a> again.</td>
75        </tr>
76        <tr>
77<th>ResultIpcSessionErr</th>
78<td>Error indicating an uninitialized connection. The function has not done anything as it has been called on a <CODE>Connection</CODE> instance for which you have not yet successfully called <a href="../../../nn/ssl/Connection/Initialize.html"><CODE>Initialize</CODE></a>.</td>
79        </tr>
80        <tr>
81<th>ResultNotInitializedErr</th>
82<td>Error indicating that the library is not initialized. None of the functions in this library can be run without first running <a href="../../../nn/ssl/Initialize.html"><CODE>nn::ssl::Initialize</CODE></a>.</td>
83        </tr>
84        <tr>
85<th>A value other than the above.</th>
86<td>Unexpected error (see <CODE>ssl_Result.h</CODE> for error details).</td>
87        </tr>
88      </table> </div>
89<h2>Description</h2>
90    <div class="section">
91<p>Loads data over an SSL connection.</p><p><CODE>ResultSuccess</CODE> is returned upon successful reads. <a href="../../../nn/ssl/ResultSocketZeroReturn/Overview.html"><CODE>ResultSocketZeroReturn</CODE></a> is returned if this function is called when all data has already been read.</p><!-- write here --></div>
92<h2>Revision History</h2>
93    <div class="section">
94      <dl class="history">
95        <dt>2010/06/14</dt>
96<dd>Initial version.<br />
97        </dd>
98      </dl>
99    </div>
100  <hr><p>CONFIDENTIAL</p></body>
101</html>
102