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>RequireConnection</title>
8  </head>
9  <body>
10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/ir/Overview.html">ir</a>::<a href="../../../../nn/ir/CTR/Overview.html">CTR</a>::<a href="../../../../nn/ir/CTR/Communicator/Overview.html">Communicator</a>::RequireConnection</CODE> Member Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14static <a href="../../../../nn/Result/Overview.html">Result</a> RequireConnection();
15</pre>
16    </div>
17<h2>Parameters</h2>
18    <div class="section">
19<p>None.</p>
20    </div>
21<h2>Return Values</h2>
22<div class="section">Returns the function's result. Returns one of the <a href="../../../../nn/Result/Overview.html"><CODE>Result</CODE></a> values listed below.<br /> <br />
23      <table class="arguments">
24        <thead>
25          <tr>
26<th>Value</th>
27<td>Description</td>
28          </tr>
29        </thead>
30        <tr>
31<th><CODE>Result::IsSuccess</CODE></th>
32<td>Process was successful.</td>
33        </tr>
34        <tr>
35<th><CODE>ResultBufferInsufficient</CODE></th>
36<td>The buffer was insufficient so the connection process could not proceed.</td>
37        </tr>
38        <tr>
39<th><CODE>ResultAlreadyConnected</CODE></th>
40<td>Already in the connected state.</td>
41        </tr>
42        <tr>
43<th><CODE>ResultAlreadyTryingToConnect</CODE></th>
44<td>In the process of connecting.</td>
45        </tr>
46        <tr>
47<th><CODE>ResultMachineSleep</CODE></th>
48<td>Sleeping because the system is in Sleep Mode.</td>
49        </tr>
50        <tr>
51<th><CODE>ResultFatalError</CODE></th>
52<td>The IR module may be malfunctioning.</td>
53        </tr>
54      </table> </div>
55<h2>Description</h2>
56    <div class="section">
57<p>Sends a connection request to the partner <a href="../../../../nn/ir/CTR/Overview.html">CTR</a> and tries to make an authenticated connection.</p><p>This function returns control before connection authentication with the partner is completed.</p><p>When a connection request is sent, this function waits for a connection reply from the partner and then, when the reply is received, transitions to the connected state.</p><p>This function will continue to wait until a connection reply comes, so if you want to abort the process call the <CODE>Disconnect</CODE> function. </p><p>If the connection succeeds, this is signaled by the event returned by the <CODE>GetConnectionStatusEvent</CODE> function. </p><p>The system always waits after connection authentication. If data have been provided by the <CODE>Send</CODE> function, the system sends the data packets after it has received all incoming data and then waits again.</p><p>If the size of the region used to save incoming and outgoing packets&mdash;as passed to the <CODE>Initialize</CODE> function&mdash;is smaller than that defined by <CODE>NECESSARY_BUFFER_SIZE_FOR_CONNECTION</CODE> or if the size of the region used to manage packets is smaller than <CODE>GetManagementSize(1)</CODE>, the connection cannot be authenticated and this function fails.</p><!-- write here --></div>
58<h2>Revision History</h2>
59    <div class="section">
60      <dl class="history">
61        <dt>2011/08/30</dt>
62<dd>Initial version.<br />
63        </dd>
64      </dl>
65    </div>
66  <hr><p>CONFIDENTIAL</p></body>
67</html>