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::rdt</title> 51 </head> 52 <body> 53<h1><CODE>nn::rdt</CODE> Namespace</h1> 54<h2>Description</h2> 55 <div class="section"> 56<p>The RDT (reliable local communication) namespace.</p><p><B>Overview:</B>The RDT library is a class library that uses the features of the UDS library to implement reliable data transmission (data sent reliably will not be corrupted or lost). The relationship between RDT and UDS can be likened to that of TCP and IP, with the former constructed atop the latter. RDT was designed to send and receive relatively large amounts of data (more than a few dozen KBs). It will not perform very well in situations in which small chunks of data (under 1 KB) are frequently being sent and received.</p><p><CODE>Sender</CODE> class: Class that represents a device sending data. A <CODE>Sender</CODE> sends data to instances of the <CODE>Receiver</CODE> class (described below). The <CODE>Sender</CODE> class implements retransmission and other features that ensure that data that is sent will always be received, even if errors like packet loss occur during communication.</p><p><CODE>Receiver</CODE> class: Class that represents a device receiving data. A <CODE>Receiver</CODE> class receives data from an instance of the aforementioned <CODE>Sender</CODE> class. The receiver continually sends ACKs (confirmatory responses) when appropriate and assembles the received data in the proper order.</p><p>UDS setup: Before an application can use RDT, it must first set up UDS. In other words, do not initialize the RDT library until a network has been created, the local host has connected to that network, and the transmission of data via UDS has become possible. Setting up UDS communication is the responsibility of the application. The same is true for dismantling the network that was created.</p><p>Features: The RDT class library involves a unidirectional flow of actual data from the <CODE>Sender</CODE> to the <CODE>Receiver</CODE>. If bidirectional communication is required, you must create another <CODE>Sender</CODE>/<CODE>Receiver</CODE> pair.</p><p>Non-blocking operation: Function calls in the RDT class library do not block. Calls to member functions like <a href="../../nn/rdt/CTR/Sender/Open.html"><CODE>Sender::Open</CODE></a>, <a href="../../nn/rdt/CTR/Receiver/Wait.html"><CODE>Receiver::Wait</CODE></a>, <a href="../../nn/rdt/CTR/Sender/Send.html"><CODE>Sender::Send</CODE></a>, and <a href="../../nn/rdt/CTR/Receiver/Receive.html"><CODE>Receiver::Receive</CODE></a> return immediately. The actual sending and receiving is handled by the <CODE>Process</CODE> function that has been provided for both classes.</p><p><CODE>Process</CODE> function: Applications must call <CODE>Process</CODE> at intervals of at least every game frame. If <CODE>Process</CODE> is not called periodically, no actual communication or state transitions will take place. (Although a few functions, including <CODE>Cancel</CODE>, are exceptions to that rule.) You can sometimes improve the performance of send/receive operations by calling <CODE>Process</CODE> several times in a row.</p><p>Memory allocation: The RDT library does not allocate memory dynamically. Any memory required by the library must be provided to the library by the application when <CODE>Initialize</CODE> is called. <BR><B>Note:</B> When providing this memory, pay attention to its alignment.</p><p><B>Note:</B>The RDT library implicitly consumes two <CODE>nn::uds::EndpointDescriptor</CODE> objects per each <CODE>Sender</CODE> or <CODE>Receiver</CODE> instance.</p><!-- write here --></div> 57 <a name="namespace" id="namespace"> 58<h2>Namespaces</h2> 59 <div class="section"> 60 <table class="members"> 61 <tr> 62 <th> 63<a href="../../nn/rdt/CTR/Overview.html"><CODE>nn::rdt::CTR</CODE></a> 64 </th> 65<td>The <a href="../../nn/rdt/CTR/Overview.html">CTR</a> RDT (reliable local communication) namespace.</td> 66 </tr> </table> 67 </div> 68 </a> 69<h2>Revision History</h2> 70 <div class="section"> 71 <dl class="history"> 72 <dt>2010/06/14</dt> 73<dd>Initial version.<br /> 74 </dd> 75 </dl> 76 </div> 77 <hr><p>CONFIDENTIAL</p></body> 78</html>