<!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::UDPSocket 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_socket.html">UDPSocket</a></div> <h1>ost::UDPSocket Class Reference</h1><!-- doxytag: class="ost::UDPSocket" --><!-- doxytag: inherits="ost::Socket" -->UDP sockets implement the TCP SOCK_DGRAM UDP protocol.Unreliable Datagram Protocol sockets. <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::UDPSocket: <p><center><img src="classost_1_1_u_d_p_socket.png" usemap="#ost::UDPSocket_map" border="0" alt=""></center> <map name="ost::UDPSocket_map"> <area href="classost_1_1_socket.html" alt="ost::Socket" shape="rect" coords="126,0,242,24"> <area href="classost_1_1_u_d_p_broadcast.html" alt="ost::UDPBroadcast" shape="rect" coords="0,112,116,136"> <area href="classost_1_1_u_d_p_receive.html" alt="ost::UDPReceive" shape="rect" coords="126,112,242,136"> <area href="classost_1_1_u_d_p_transmit.html" alt="ost::UDPTransmit" shape="rect" coords="252,112,368,136"> <area href="classost_1_1_u_d_p_duplex.html" alt="ost::UDPDuplex" shape="rect" coords="126,168,242,192"> <area href="classost_1_1_u_d_p_duplex.html" alt="ost::UDPDuplex" shape="rect" coords="252,168,368,192"> </map> <a href="classost_1_1_u_d_p_socket-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_socket.html#0171b5791de219c33e0bef1a7f01d366">UDPSocket</a> (<a class="el" href="classost_1_1_socket.html#aa032e41b920b38a79c875b8ae375799">Family</a> <a class="el" href="classost_1_1_u_d_p_socket.html#fe9f40091dc6c57c6743cf0720ab5938">family</a>=IPV4)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create an unbound UDP socket, mostly for internal use. <a href="#0171b5791de219c33e0bef1a7f01d366"></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_socket.html#8f9e2a46cf3aaa4edf41cfb9ed402171">UDPSocket</a> (const char *name, <a class="el" href="classost_1_1_socket.html#aa032e41b920b38a79c875b8ae375799">Family</a> <a class="el" href="classost_1_1_u_d_p_socket.html#fe9f40091dc6c57c6743cf0720ab5938">family</a>=IPV4)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a UDP socket bound by a service name. <a href="#8f9e2a46cf3aaa4edf41cfb9ed402171"></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_socket.html#0e5c7aed7d7dbee9152282ca9d3627d2">UDPSocket</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 socket and bind it to a specific interface and port address so that other UDP sockets on remote machines (or the same host) may find and send UDP messages to it. <a href="#0e5c7aed7d7dbee9152282ca9d3627d2"></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_socket.html#781894813be82c4f6aa5827fa087fb68">UDPSocket</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">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#513c2f1fb2f84a295fe78527e47e052e">~UDPSocket</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a UDP socket as a socket. <a href="#513c2f1fb2f84a295fe78527e47e052e"></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_socket.html#fbf86c658fcf48b0ba946a238df091d3">setLoopback</a> (bool enable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the loopback. <a href="#fbf86c658fcf48b0ba946a238df091d3"></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_socket.html#ce98f5833ad9834af24e78697699c912">setMulticast</a> (bool enable)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the multicast. <a href="#ce98f5833ad9834af24e78697699c912"></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_socket.html#d3cf52efd8d79b40796d67b59285d2cf">setTimeToLive</a> (char <a class="el" href="classost_1_1_socket.html#6adc7a5d594ab3b8bace496f7a6757e9">ttl</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set time to live. <a href="#d3cf52efd8d79b40796d67b59285d2cf"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#0a1aed4af396b54c42d5a616688b1426">setPeer</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">set the peer address to send message packets to. <a href="#0a1aed4af396b54c42d5a616688b1426"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#519db2909a1c43e791e6620b758d3fdc">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="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#943d73dd40035a5d675a9d4a7e102725">setPeer</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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#759c8f5c76cacfdeac979a5034d658d7">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">Socket::Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#ef52438ac3e537420d3264690a628dfa">getInterfaceIndex</a> (const char *ethX, int &InterfaceIndex)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">get the interface index for a named network device <a href="#ef52438ac3e537420d3264690a628dfa"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_socket.html#3306a277326459f69aa69b474f50d6e2">Socket::Error</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#a0277a5c4667f5c9e192c1dc5486b5fb">join</a> (const <a class="el" href="classost_1_1_i_p_v4_multicast.html">IPV4Multicast</a> &ia, int InterfaceIndex)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">join a multicast group on a particular interface <a href="#a0277a5c4667f5c9e192c1dc5486b5fb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#4d58bb8e7a0ea0112da563bfd2eaa947">send</a> (const void *buf, size_t len)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Send a message packet to a peer host. <a href="#4d58bb8e7a0ea0112da563bfd2eaa947"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#3f5c684f2fc3d1b65a1a5e2966f5b292">receive</a> (void *buf, size_t len, bool reply=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Receive a message from any host. <a href="#3f5c684f2fc3d1b65a1a5e2966f5b292"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#a2d073bd4fa3c3f1c7b70629996c67f7">getIPV4Peer</a> (<a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> *port=NULL) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Examine address of sender of next waiting packet. <a href="#a2d073bd4fa3c3f1c7b70629996c67f7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_i_p_v4_host.html">IPV4Host</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#5d06e7131790dd26cc3cf0b1531af3a2">getPeer</a> (<a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> *port=NULL) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_i_p_v6_host.html">IPV6Host</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#37b34f874ffb96bfc933b4eda0f6e80c">getIPV6Peer</a> (<a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> *port=NULL) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#64b09e6ac9325d8f44d7ca7ed59215bf">peek</a> (void *buf, size_t len)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Examine contents of next waiting packet. <a href="#64b09e6ac9325d8f44d7ca7ed59215bf"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#1bef3ed88eb3852679642510864b419c">setPeer</a> (const char *service)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Associate socket with a named connection. <a href="#1bef3ed88eb3852679642510864b419c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#197a034e4ebc8172ede75d1d69616f15">connect</a> (const char *service)</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_socket.html#cb4faa86204e7b37bf447f4802c8940d">disconnect</a> (void)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Disassociate this socket from any host connection. <a href="#cb4faa86204e7b37bf447f4802c8940d"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap>union {</td></tr> <tr><td class="memItemLeft" nowrap> sockaddr_in6 <a class="el" href="classost_1_1_u_d_p_socket.html#9842db7ec82d337e554d264e7230a705">ipv6</a></td></tr> <tr><td class="memItemLeft" nowrap> sockaddr_in <a class="el" href="classost_1_1_u_d_p_socket.html#d4c15c1eb5dd4f0ce6d4487b43869215">ipv4</a></td></tr> <tr><td class="memItemLeft" nowrap valign="top">} </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#4195fc28fdeba6a8eea55c1f9b0d5e96">peer</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classost_1_1_socket.html#aa032e41b920b38a79c875b8ae375799">Family</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_u_d_p_socket.html#fe9f40091dc6c57c6743cf0720ab5938">family</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> UDP sockets implement the TCP SOCK_DGRAM UDP protocol.Unreliable Datagram Protocol sockets. <p> They can be used to pass unverified messages between hosts, or to broadcast a specific message to an entire subnet. Please note that Streaming of realtime data commonly use <a class="el" href="classost_1_1_u_d_p_duplex.html">UDPDuplex</a> related classes rather than <a class="el" href="classost_1_1_u_d_p_socket.html">UDPSocket</a>.<p> In addition to connected TCP sessions, Common C++ supports UDP sockets and these also cover a range of functionality. Like a <a class="el" href="classost_1_1_t_c_p_socket.html">TCPSocket</a>, A <a class="el" href="classost_1_1_u_d_p_socket.html">UDPSocket</a> can be created bound to a specific network interface and/or port address, though this is not required. UDP sockets also are usually either connected or otherwise "associated" with a specific "peer" UDP socket. Since UDP sockets operate through discreet packets, there are no streaming operators used with UDP sockets.<p> In addition to the UDP "socket" class, there is a "UDPBroadcast" class. The <a class="el" href="classost_1_1_u_d_p_broadcast.html">UDPBroadcast</a> is a socket that is set to send messages to a subnet as a whole rather than to an individual peer socket that it may be associated with.<p> UDP sockets are often used for building "realtime" media streaming protocols and full duplex messaging services. When used in this manner, typically a pair of UDP sockets are used together; one socket is used to send and the other to receive data with an associated pair of UDP sockets on a "peer" host. This concept is represented through the Common C++ <a class="el" href="classost_1_1_u_d_p_duplex.html">UDPDuplex</a> object, which is a pair of sockets that communicate with another <a class="el" href="classost_1_1_u_d_p_duplex.html">UDPDuplex</a> pair.<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="0171b5791de219c33e0bef1a7f01d366"></a><!-- doxytag: member="ost::UDPSocket::UDPSocket" ref="0171b5791de219c33e0bef1a7f01d366" args="(Family family=IPV4)" --><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::UDPSocket::UDPSocket </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_socket.html#aa032e41b920b38a79c875b8ae375799">Family</a> </td> <td class="mdname1" valign="top" nowrap> <em>family</em> = <code>IPV4</code> </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> Create an unbound UDP socket, mostly for internal use. <p> </td> </tr> </table> <a class="anchor" name="8f9e2a46cf3aaa4edf41cfb9ed402171"></a><!-- doxytag: member="ost::UDPSocket::UDPSocket" ref="8f9e2a46cf3aaa4edf41cfb9ed402171" args="(const char *name, Family family=IPV4)" --><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::UDPSocket::UDPSocket </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>name</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="classost_1_1_socket.html#aa032e41b920b38a79c875b8ae375799">Family</a> </td> <td class="mdname" nowrap> <em>family</em> = <code>IPV4</code></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 socket bound by a service name. <p> </td> </tr> </table> <a class="anchor" name="0e5c7aed7d7dbee9152282ca9d3627d2"></a><!-- doxytag: member="ost::UDPSocket::UDPSocket" ref="0e5c7aed7d7dbee9152282ca9d3627d2" 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::UDPSocket::UDPSocket </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 socket and bind it to a specific interface and port address so that other UDP sockets on remote machines (or the same host) may find and send UDP messages to it. <p> On failure to bind, an exception is thrown.<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 this socket to. </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="781894813be82c4f6aa5827fa087fb68"></a><!-- doxytag: member="ost::UDPSocket::UDPSocket" ref="781894813be82c4f6aa5827fa087fb68" 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::UDPSocket::UDPSocket </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> <a class="anchor" name="513c2f1fb2f84a295fe78527e47e052e"></a><!-- doxytag: member="ost::UDPSocket::~UDPSocket" ref="513c2f1fb2f84a295fe78527e47e052e" args="()" --><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">virtual ost::UDPSocket::~UDPSocket </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Destroy a UDP socket as a socket. <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="197a034e4ebc8172ede75d1d69616f15"></a><!-- doxytag: member="ost::UDPSocket::connect" ref="197a034e4ebc8172ede75d1d69616f15" args="(const char *service)" --><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">void ost::UDPSocket::connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>service</em> </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> </td> </tr> </table> <a class="anchor" name="759c8f5c76cacfdeac979a5034d658d7"></a><!-- doxytag: member="ost::UDPSocket::connect" ref="759c8f5c76cacfdeac979a5034d658d7" 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">void ost::UDPSocket::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 in <a class="el" href="classost_1_1_u_d_p_receive.html#0e8c851cbc68729353b76894107091e9">ost::UDPReceive</a>, and <a class="el" href="classost_1_1_u_d_p_duplex.html#60abbfd8ef6eac65c8b9726a1d489440">ost::UDPDuplex</a>. </td> </tr> </table> <a class="anchor" name="519db2909a1c43e791e6620b758d3fdc"></a><!-- doxytag: member="ost::UDPSocket::connect" ref="519db2909a1c43e791e6620b758d3fdc" 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">void ost::UDPSocket::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> <p> Reimplemented in <a class="el" href="classost_1_1_u_d_p_transmit.html#d9b9d46dfaf10ad1555c0fa08db339be">ost::UDPTransmit</a>, <a class="el" href="classost_1_1_u_d_p_receive.html#a669c5dcf686c200752d4ca125f9f4a6">ost::UDPReceive</a>, and <a class="el" href="classost_1_1_u_d_p_duplex.html#219b6497a5dd25e943639cfc1bbb8f81">ost::UDPDuplex</a>. </td> </tr> </table> <a class="anchor" name="cb4faa86204e7b37bf447f4802c8940d"></a><!-- doxytag: member="ost::UDPSocket::disconnect" ref="cb4faa86204e7b37bf447f4802c8940d" 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::UDPSocket::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 socket from any host connection. <p> No data should be read or written until a connection is established. <p> Reimplemented in <a class="el" href="classost_1_1_u_d_p_duplex.html#fa88407cb5be59e11154ce250a5a5c5c">ost::UDPDuplex</a>. </td> </tr> </table> <a class="anchor" name="ef52438ac3e537420d3264690a628dfa"></a><!-- doxytag: member="ost::UDPSocket::getInterfaceIndex" ref="ef52438ac3e537420d3264690a628dfa" args="(const char *ethX, int &InterfaceIndex)" --><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">Socket::Error</a> ost::UDPSocket::getInterfaceIndex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>ethX</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int & </td> <td class="mdname" nowrap> <em>InterfaceIndex</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> get the interface index for a named network device <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>ethX</em> </td><td>is device name, like "eth0" or "eth1" </td></tr> <tr><td valign="top"></td><td valign="top"><em>InterfaceIndex</em> </td><td>is the index value returned by os </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Win32 and ipv6 specific implementation. </dd></dl> </td> </tr> </table> <a class="anchor" name="a2d073bd4fa3c3f1c7b70629996c67f7"></a><!-- doxytag: member="ost::UDPSocket::getIPV4Peer" ref="a2d073bd4fa3c3f1c7b70629996c67f7" args="(tpport_t *port=NULL) const " --><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_i_p_v4_host.html">IPV4Host</a> ost::UDPSocket::getIPV4Peer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>port</em> = <code>NULL</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Examine address of sender of next waiting packet. <p> This also sets "peer" address to the sender so that the next "send" message acts as a "reply". This additional behavior overides the standard socket getSender behavior.<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>port</em> </td><td>pointer to hold port number. </td></tr> </table> </dl> <p> Reimplemented from <a class="el" href="classost_1_1_socket.html#8c8d2cfd48c75b03dc776b38b1c095f7">ost::Socket</a>. </td> </tr> </table> <a class="anchor" name="37b34f874ffb96bfc933b4eda0f6e80c"></a><!-- doxytag: member="ost::UDPSocket::getIPV6Peer" ref="37b34f874ffb96bfc933b4eda0f6e80c" args="(tpport_t *port=NULL) const " --><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_i_p_v6_host.html">IPV6Host</a> ost::UDPSocket::getIPV6Peer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>port</em> = <code>NULL</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</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_socket.html#d625daf4cffb541c5e8592792d4ee77e">ost::Socket</a>. </td> </tr> </table> <a class="anchor" name="5d06e7131790dd26cc3cf0b1531af3a2"></a><!-- doxytag: member="ost::UDPSocket::getPeer" ref="5d06e7131790dd26cc3cf0b1531af3a2" args="(tpport_t *port=NULL) const " --><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_i_p_v4_host.html">IPV4Host</a> ost::UDPSocket::getPeer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="namespaceost.html#3c74a1a40c359fd349f3e3e1b96ebfc7">tpport_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>port</em> = <code>NULL</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline]</code></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_socket.html#6fd1dffdfe9606e56fba838559ff6d67">ost::Socket</a>. </td> </tr> </table> <a class="anchor" name="a0277a5c4667f5c9e192c1dc5486b5fb"></a><!-- doxytag: member="ost::UDPSocket::join" ref="a0277a5c4667f5c9e192c1dc5486b5fb" args="(const IPV4Multicast &ia, int InterfaceIndex)" --><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">Socket::Error</a> ost::UDPSocket::join </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_i_p_v4_multicast.html">IPV4Multicast</a> & </td> <td class="mdname" nowrap> <em>ia</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>InterfaceIndex</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> join a multicast group on a particular interface <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>ia</em> </td><td>is the multicast address to use </td></tr> <tr><td valign="top"></td><td valign="top"><em>InterfaceIndex</em> </td><td>is the index value returned by getInterfaceIndex </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Win32 and ipv6 specific implementation. </dd></dl> </td> </tr> </table> <a class="anchor" name="64b09e6ac9325d8f44d7ca7ed59215bf"></a><!-- doxytag: member="ost::UDPSocket::peek" ref="64b09e6ac9325d8f44d7ca7ed59215bf" args="(void *buf, size_t len)" --><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">ssize_t ost::UDPSocket::peek </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname" nowrap> <em>buf</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>size_t </td> <td class="mdname" nowrap> <em>len</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Examine contents of next waiting packet. <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>buf</em> </td><td>pointer to packet buffer for contents. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>of packet buffer. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>number of bytes examined. </dd></dl> </td> </tr> </table> <a class="anchor" name="3f5c684f2fc3d1b65a1a5e2966f5b292"></a><!-- doxytag: member="ost::UDPSocket::receive" ref="3f5c684f2fc3d1b65a1a5e2966f5b292" args="(void *buf, size_t len, bool reply=false)" --><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">ssize_t ost::UDPSocket::receive </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname" nowrap> <em>buf</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>size_t </td> <td class="mdname" nowrap> <em>len</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>reply</em> = <code>false</code></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> Receive a message from any host. <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>buf</em> </td><td>pointer to packet buffer to receive. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>of packet buffer to receive. </td></tr> <tr><td valign="top"></td><td valign="top"><em>reply</em> </td><td>save sender address for reply if true. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>number of bytes received. </dd></dl> </td> </tr> </table> <a class="anchor" name="4d58bb8e7a0ea0112da563bfd2eaa947"></a><!-- doxytag: member="ost::UDPSocket::send" ref="4d58bb8e7a0ea0112da563bfd2eaa947" args="(const void *buf, size_t len)" --><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">ssize_t ost::UDPSocket::send </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const void * </td> <td class="mdname" nowrap> <em>buf</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>size_t </td> <td class="mdname" nowrap> <em>len</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> Send a message packet to a peer host. <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>buf</em> </td><td>pointer to packet buffer to send. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>of packet buffer to send. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>number of bytes sent. </dd></dl> <p> Reimplemented in <a class="el" href="classost_1_1_u_d_p_transmit.html#c20e40569ec5502849fa3337dcfdf611">ost::UDPTransmit</a>. </td> </tr> </table> <a class="anchor" name="fbf86c658fcf48b0ba946a238df091d3"></a><!-- doxytag: member="ost::UDPSocket::setLoopback" ref="fbf86c658fcf48b0ba946a238df091d3" args="(bool enable)" --><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::UDPSocket::setLoopback </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>enable</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set the loopback. <p> </td> </tr> </table> <a class="anchor" name="ce98f5833ad9834af24e78697699c912"></a><!-- doxytag: member="ost::UDPSocket::setMulticast" ref="ce98f5833ad9834af24e78697699c912" args="(bool enable)" --><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::UDPSocket::setMulticast </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>enable</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set the multicast. <p> <p> Reimplemented in <a class="el" href="classost_1_1_u_d_p_transmit.html#4e5c8fb7c2ea5f78454d303169d68b61">ost::UDPTransmit</a>, and <a class="el" href="classost_1_1_u_d_p_receive.html#a513f9513f012494e0fbd61d84c665f6">ost::UDPReceive</a>. </td> </tr> </table> <a class="anchor" name="1bef3ed88eb3852679642510864b419c"></a><!-- doxytag: member="ost::UDPSocket::setPeer" ref="1bef3ed88eb3852679642510864b419c" args="(const char *service)" --><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">void ost::UDPSocket::setPeer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>service</em> </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> Associate socket with a named connection. <p> </td> </tr> </table> <a class="anchor" name="943d73dd40035a5d675a9d4a7e102725"></a><!-- doxytag: member="ost::UDPSocket::setPeer" ref="943d73dd40035a5d675a9d4a7e102725" 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">void ost::UDPSocket::setPeer </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> </td> </tr> </table> <a class="anchor" name="0a1aed4af396b54c42d5a616688b1426"></a><!-- doxytag: member="ost::UDPSocket::setPeer" ref="0a1aed4af396b54c42d5a616688b1426" 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">void ost::UDPSocket::setPeer </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> set the peer address to send message packets to. <p> This can be set before every <a class="el" href="classost_1_1_u_d_p_socket.html#4d58bb8e7a0ea0112da563bfd2eaa947">send()</a> call if nessisary.<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>host</em> </td><td>address to send packets to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>number to deliver packets to. </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="d3cf52efd8d79b40796d67b59285d2cf"></a><!-- doxytag: member="ost::UDPSocket::setTimeToLive" ref="d3cf52efd8d79b40796d67b59285d2cf" args="(char ttl)" --><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::UDPSocket::setTimeToLive </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>ttl</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set time to live. <p> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="fe9f40091dc6c57c6743cf0720ab5938"></a><!-- doxytag: member="ost::UDPSocket::family" ref="fe9f40091dc6c57c6743cf0720ab5938" args="" --><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#aa032e41b920b38a79c875b8ae375799">Family</a> <a class="el" href="classost_1_1_u_d_p_socket.html#fe9f40091dc6c57c6743cf0720ab5938">ost::UDPSocket::family</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="d4c15c1eb5dd4f0ce6d4487b43869215"></a><!-- doxytag: member="ost::UDPSocket::ipv4" ref="d4c15c1eb5dd4f0ce6d4487b43869215" args="" --><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">struct sockaddr_in <a class="el" href="classost_1_1_u_d_p_socket.html#d4c15c1eb5dd4f0ce6d4487b43869215">ost::UDPSocket::ipv4</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="9842db7ec82d337e554d264e7230a705"></a><!-- doxytag: member="ost::UDPSocket::ipv6" ref="9842db7ec82d337e554d264e7230a705" args="" --><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">struct sockaddr_in6 <a class="el" href="classost_1_1_u_d_p_socket.html#9842db7ec82d337e554d264e7230a705">ost::UDPSocket::ipv6</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="4195fc28fdeba6a8eea55c1f9b0d5e96"></a><!-- doxytag: member="ost::UDPSocket::peer" ref="4195fc28fdeba6a8eea55c1f9b0d5e96" args="" --><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">union { ... } <a class="el" href="classost_1_1_u_d_p_socket.html#4195fc28fdeba6a8eea55c1f9b0d5e96">ost::UDPSocket::peer</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </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>