📄 classtcpip.html
字号:
<td class="md" nowrap valign="top"> int tcpip::connectUDP </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>host</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>service</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Opens socket for communicating with UDP server.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>host</em> </td><td>hostname or IP address of the server </td></tr><tr><td valign=top><em>service</em> </td><td>port number of the server </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>network socket descriptor </dl><dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="tcpip_8cc-source.html#l00066">66</a> of file <a class="el" href="tcpip_8cc-source.html">tcpip.cc</a>.<p>References <a class="el" href="tcpip_8cc-source.html#l00081">connectsock</a>().<p>Referenced by <a class="el" href="client_8cc-source.html#l00068">client::recive</a>(), and <a class="el" href="client_8cc-source.html#l00060">client::send</a>(). </td> </tr></table><a name="c1" doxytag="tcpip::passivesock"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int tcpip::passivesock </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>service</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char * </td> <td class="mdname" nowrap> <em>protocol</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>qlen</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Opens socket for listening for TCP or UDP clients.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>service</em> </td><td>port number of the server </td></tr><tr><td valign=top><em>protocol</em> </td><td>"TCP" or "UDP" </td></tr><tr><td valign=top><em>qlen</em> </td><td>maximal length of requests queue (for UDP qlen = 0) </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>network socket descriptor </dl><dl compact><dt><b>Author: </b><dd>Marcin Caban (based on examples from "Internetworking with TCP/IP" written by Douglas E. Comer and David L. Stevens) </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="tcpip_8cc-source.html#l00128">128</a> of file <a class="el" href="tcpip_8cc-source.html">tcpip.cc</a>.<p>References <a class="el" href="const_8h-source.html#l00035">_NET_ERR_</a>, <a class="el" href="tcpip_8cc-source.html#l00047">errno</a>, <a class="el" href="tcpip_8h-source.html#l00099">portbase</a>, and <a class="el" href="tcpip_8cc-source.html#l00048">sys_errlist</a>.<p>Referenced by <a class="el" href="tcpip_8cc-source.html#l00071">passiveTCP</a>(), and <a class="el" href="tcpip_8cc-source.html#l00076">passiveUDP</a>(). </td> </tr></table><a name="b2" doxytag="tcpip::passiveTCP"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int tcpip::passiveTCP </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> <em>service</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>qlen</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Opens socket for listening for TCP connections from clients.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>service</em> </td><td>port number for listening </td></tr><tr><td valign=top><em>qlen</em> </td><td>maximal length of requests queue </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>network socket descriptor </dl><dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="tcpip_8cc-source.html#l00071">71</a> of file <a class="el" href="tcpip_8cc-source.html">tcpip.cc</a>.<p>References <a class="el" href="tcpip_8cc-source.html#l00128">passivesock</a>(). </td> </tr></table><a name="b3" doxytag="tcpip::passiveUDP"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int tcpip::passiveUDP </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>service</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Opens socket for listening for UDP packages from clients.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>service</em> </td><td>port number of the server </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>network socket descriptor </dl><dl compact><dt><b>Author: </b><dd>Marcin Caban </dl><dl compact><dt><b>Date: </b><dd>Thu Jan 17 01:41:18 2002 </dl><p>Definition at line <a class="el" href="tcpip_8cc-source.html#l00076">76</a> of file <a class="el" href="tcpip_8cc-source.html">tcpip.cc</a>.<p>References <a class="el" href="tcpip_8cc-source.html#l00128">passivesock</a>().<p>Referenced by <a class="el" href="server_8cc-source.html#l00047">server::server</a>(). </td> </tr></table><hr><h2>Field Documentation</h2><a name="o0" doxytag="tcpip::portbase"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned short int tcpip::portbase<code> [private]</code> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>PortBase.<p>Every port number in this class is incremented by value of this variable. <dl compact><dt><b><a class="el" href="todo.html#_todo000004">Todo: </a></b><dd> Make availability to change value of this variable, now it is always equal to 0. </dl> <p>Definition at line <a class="el" href="tcpip_8h-source.html#l00099">99</a> of file <a class="el" href="tcpip_8h-source.html">tcpip.h</a>.<p>Referenced by <a class="el" href="tcpip_8cc-source.html#l00128">passivesock</a>(), and <a class="el" href="tcpip_8cc-source.html#l00051">tcpip</a>(). </td> </tr></table><hr><address><small>© 2002 Marcin Caban 'Cabko' and Borys Wisniewski 'Boria'</small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -