/usr/share/doc/libucommon-dev/a00070.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucc::ListenSocket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00070.html">ListenSocket</a>
</div>
</div>
<div class="contents">
<h1>ucc::ListenSocket Class Reference</h1><!-- doxytag: class="ucc::ListenSocket" --><!-- doxytag: inherits="ucc::Socket" -->
<p>A bound socket used to listen for inbound socket connections.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00205_source.html">socket.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for ucc::ListenSocket:</div>
<div class="dynsection">
<div class="center"><img src="a00419.png" border="0" usemap="#ucc_1_1_listen_socket_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1_listen_socket_inherit__map" id="ucc_1_1_listen_socket_inherit__map">
<area shape="rect" id="node5" href="a00161.html" title="A generic tcp server class for TCPSocket." alt="" coords="13,160,131,189"/><area shape="rect" id="node2" href="a00151.html" title="A generic socket base class." alt="" coords="24,5,120,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucc::ListenSocket:</div>
<div class="dynsection">
<div class="center"><img src="a00420.png" border="0" usemap="#ucc_1_1_listen_socket_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1_listen_socket_coll__map" id="ucc_1_1_listen_socket_coll__map">
<area shape="rect" id="node2" href="a00151.html" title="A generic socket base class." alt="" coords="24,5,120,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">socket_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#acef519b49514d0a07e75d968f60d6d7b">accept</a> (struct sockaddr_storage *<a class="el" href="a00152.html">address</a>=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Accept a socket connection. <a href="#acef519b49514d0a07e75d968f60d6d7b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">socket_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a309ecfc585ce3350929435e9db21e1aa">getsocket</a> (void) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the socket descriptor of the listener. <a href="#a309ecfc585ce3350929435e9db21e1aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a8dce63aeac2eb67688bc7f9074f1e08e">ListenSocket</a> (const char *<a class="el" href="a00152.html">address</a>, const char *service, unsigned backlog=5, int protocol=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create and bind a listener socket. <a href="#a8dce63aeac2eb67688bc7f9074f1e08e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a784408e6787a07d7eb2a00239558dd79">operator socket_t</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the socket descriptor of the listener. <a href="#a784408e6787a07d7eb2a00239558dd79"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">socket_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a4c5f973f8890e7c74c772466f2c81f4b">operator*</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the socket descriptor of the listener by pointer reference. <a href="#a4c5f973f8890e7c74c772466f2c81f4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00070.html#a3f7eed6a3faaeef37e6698d57e966143">waitConnection</a> (<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wait for a pending connection. <a href="#a3f7eed6a3faaeef37e6698d57e966143"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A bound socket used to listen for inbound socket connections. </p>
<p>This class is commonly used for TCP and DCCP listener sockets. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00205_source.html#l01669">1669</a> of file <a class="el" href="a00205_source.html">socket.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a8dce63aeac2eb67688bc7f9074f1e08e"></a><!-- doxytag: member="ucc::ListenSocket::ListenSocket" ref="a8dce63aeac2eb67688bc7f9074f1e08e" args="(const char *address, const char *service, unsigned backlog=5, int protocol=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::ListenSocket::ListenSocket </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>service</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"> <em>backlog</em> = <code>5</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>protocol</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create and bind a listener socket. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>to bind on or "*" for all. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>service</em> </td><td>port to bind listener. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>backlog</em> </td><td>size for buffering pending connections. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>protocol</em> </td><td>for socket if not TCPIP. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acef519b49514d0a07e75d968f60d6d7b"></a><!-- doxytag: member="ucc::ListenSocket::accept" ref="acef519b49514d0a07e75d968f60d6d7b" args="(struct sockaddr_storage *address=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">socket_t ucc::ListenSocket::accept </td>
<td>(</td>
<td class="paramtype">struct sockaddr_storage * </td>
<td class="paramname"> <em>address</em> = <code>NULL</code></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Accept a socket connection. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>to save peer connecting. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>socket descriptor of connected socket. </dd></dl>
</div>
</div>
<a class="anchor" id="a309ecfc585ce3350929435e9db21e1aa"></a><!-- doxytag: member="ucc::ListenSocket::getsocket" ref="a309ecfc585ce3350929435e9db21e1aa" args="(void) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">socket_t ucc::ListenSocket::getsocket </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the socket descriptor of the listener. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>socket descriptor. </dd></dl>
<p>Definition at line <a class="el" href="a00205_source.html#l01714">1714</a> of file <a class="el" href="a00205_source.html">socket.h</a>.</p>
</div>
</div>
<a class="anchor" id="a784408e6787a07d7eb2a00239558dd79"></a><!-- doxytag: member="ucc::ListenSocket::operator socket_t" ref="a784408e6787a07d7eb2a00239558dd79" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::ListenSocket::operator socket_t </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the socket descriptor of the listener. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>socket descriptor. </dd></dl>
<p>Reimplemented from <a class="el" href="a00151.html#aba6ee1e3f02c944194264ce25ca47520">ucc::Socket</a>.</p>
<p>Definition at line <a class="el" href="a00205_source.html#l01700">1700</a> of file <a class="el" href="a00205_source.html">socket.h</a>.</p>
</div>
</div>
<a class="anchor" id="a4c5f973f8890e7c74c772466f2c81f4b"></a><!-- doxytag: member="ucc::ListenSocket::operator*" ref="a4c5f973f8890e7c74c772466f2c81f4b" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">socket_t ucc::ListenSocket::operator* </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the socket descriptor of the listener by pointer reference. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>socket descriptor. </dd></dl>
<p>Reimplemented from <a class="el" href="a00151.html#a2fbb299804a3921e49303654f03f3eb1">ucc::Socket</a>.</p>
<p>Definition at line <a class="el" href="a00205_source.html#l01707">1707</a> of file <a class="el" href="a00205_source.html">socket.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3f7eed6a3faaeef37e6698d57e966143"></a><!-- doxytag: member="ucc::ListenSocket::waitConnection" ref="a3f7eed6a3faaeef37e6698d57e966143" args="(timeout_t timeout=Timer::inf) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::ListenSocket::waitConnection </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> </td>
<td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Wait for a pending connection. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>timeout</em> </td><td>to wait. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true when acceptable connection is pending. </dd></dl>
<p>Definition at line <a class="el" href="a00205_source.html#l01693">1693</a> of file <a class="el" href="a00205_source.html">socket.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00205_source.html">socket.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:32 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|