<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>GNU CommonC++: ost::UDPDuplex Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_u_d_p_duplex.html">UDPDuplex</a></div> <h1>ost::UDPDuplex Class Reference</h1><!-- doxytag: class="ost::UDPDuplex" --><!-- doxytag: inherits="ost::UDPTransmit,ost::UDPReceive" -->UDP duplex connections impliment a bi-directional point-to-point UDP session between two peer hosts.Unreliable Datagram Peer Associations. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="socket_8h-source.html">socket.h</a>></code> <p> <p>Inheritance diagram for ost::UDPDuplex: <p><center><img src="classost_1_1_u_d_p_duplex.png" usemap="#ost::UDPDuplex_map" border="0" alt=""></center> <map name="ost::UDPDuplex_map"> <area href="classost_1_1_u_d_p_transmit.html" alt="ost::UDPTransmit" shape="rect" coords="0,112,106,136"> <area href="classost_1_1_u_d_p_receive.html" alt="ost::UDPReceive" shape="rect" coords="116,112,222,136"> <area href="classost_1_1_u_d_p_socket.html" alt="ost::UDPSocket" shape="rect" coords="0,56,106,80"> <area href="classost_1_1_u_d_p_socket.html" alt="ost::UDPSocket" shape="rect" coords="116,56,222,80"> <area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="0,0,106,24"> <area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="116,0,222,24"> </map> <a href="classost_1_1_u_d_p_duplex-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_duplex.html#4e7880d62525ae7256b802b45820eb83">UDPDuplex</a> (const <a class="el" href="classost_1_1_i_p_v4_address.html">IPV4Address</a> &bind, <a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> port)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a UDP duplex as a pair of UDP simplex objects bound to alternating and interconnected port addresses. <a href="#4e7880d62525ae7256b802b45820eb83"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_duplex.html#c808bc00d4be2b4af3d69e88beeefb2e">UDPDuplex</a> (const <a class="el" href="classost_1_1_i_p_v6_address.html">IPV6Address</a> &bind, <a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> port)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_duplex.html#219b6497a5dd25e943639cfc1bbb8f81">connect</a> (const <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> &host, <a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> port)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Associate the duplex with a specified peer host. <a href="#219b6497a5dd25e943639cfc1bbb8f81"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_duplex.html#60abbfd8ef6eac65c8b9726a1d489440">connect</a> (const <a class="el" href="classost_1_1_i_p_v6_host.html">IPV6Host</a> &host, <a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> port)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_duplex.html#fa88407cb5be59e11154ce250a5a5c5c">disconnect</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Disassociate this duplex from any host connection. <a href="#fa88407cb5be59e11154ce250a5a5c5c"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> UDP duplex connections impliment a bi-directional point-to-point UDP session between two peer hosts.Unreliable Datagram Peer Associations. <p> Two UDP sockets are typically used on alternating port addresses to assure that sender and receiver data does not collide or echo back. A UDP Duplex is commonly used for full duplex real-time streaming of UDP data between hosts.<p> <dl compact><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> </dd></dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="4e7880d62525ae7256b802b45820eb83"></a><!-- doxytag: member="ost::UDPDuplex::UDPDuplex" ref="4e7880d62525ae7256b802b45820eb83" args="(const IPV4Address &bind, tpport_t port)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">ost::UDPDuplex::UDPDuplex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v4_address.html">IPV4Address</a> & </td> <td class="mdname" nowrap> <em>bind</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Create a UDP duplex as a pair of UDP simplex objects bound to alternating and interconnected port addresses. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>bind</em> </td><td>address to bind this socket to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>number to bind sender. </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="c808bc00d4be2b4af3d69e88beeefb2e"></a><!-- doxytag: member="ost::UDPDuplex::UDPDuplex" ref="c808bc00d4be2b4af3d69e88beeefb2e" args="(const IPV6Address &bind, tpport_t port)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">ost::UDPDuplex::UDPDuplex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v6_address.html">IPV6Address</a> & </td> <td class="mdname" nowrap> <em>bind</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="60abbfd8ef6eac65c8b9726a1d489440"></a><!-- doxytag: member="ost::UDPDuplex::connect" ref="60abbfd8ef6eac65c8b9726a1d489440" args="(const IPV6Host &host, tpport_t port)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> ost::UDPDuplex::connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v6_host.html">IPV6Host</a> & </td> <td class="mdname" nowrap> <em>host</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <p> Reimplemented from <a class="el" href="classost_1_1_u_d_p_receive.html#0e8c851cbc68729353b76894107091e9">ost::UDPReceive</a>. </td> </tr> </table> <a class="anchor" name="219b6497a5dd25e943639cfc1bbb8f81"></a><!-- doxytag: member="ost::UDPDuplex::connect" ref="219b6497a5dd25e943639cfc1bbb8f81" args="(const IPV4Host &host, tpport_t port)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> ost::UDPDuplex::connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> & </td> <td class="mdname" nowrap> <em>host</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Associate the duplex with a specified peer host. <p> Both the sender and receiver will be interconnected with the remote host.<p> <dl compact><dt><b>Returns:</b></dt><dd>0 on success, error code on error. </dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>host</em> </td><td>address to connect socket to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>number to connect socket to. </td></tr> </table> </dl> <p> Reimplemented from <a class="el" href="classost_1_1_u_d_p_transmit.html#d9b9d46dfaf10ad1555c0fa08db339be">ost::UDPTransmit</a>. </td> </tr> </table> <a class="anchor" name="fa88407cb5be59e11154ce250a5a5c5c"></a><!-- doxytag: member="ost::UDPDuplex::disconnect" ref="fa88407cb5be59e11154ce250a5a5c5c" args="(void)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Error</a> ost::UDPDuplex::disconnect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Disassociate this duplex from any host connection. <p> No data should be read or written until a connection is established.<p> <dl compact><dt><b>Returns:</b></dt><dd>0 on success, error code on error. </dd></dl> <p> Reimplemented from <a class="el" href="classost_1_1_u_d_p_socket.html#cb4faa86204e7b37bf447f4802c8940d">ost::UDPSocket</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="socket_8h-source.html">socket.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:57 2006 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> </body> </html>