⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classptcpsocket.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PTCPSocket class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>PTCPSocket Class Reference</h1><code>#include &lt;<a class="el" href="tcpsock_8h-source.html">tcpsock.h</a>&gt;</code><p><p>Inheritance diagram for PTCPSocket:<p><center><img src="classPTCPSocket.png" usemap="#PTCPSocket_map" border="0" alt=""></center><map name="PTCPSocket_map"><area href="classPIPSocket.html" alt="PIPSocket" shape="rect" coords="109,168,208,192"><area href="classPSocket.html" alt="PSocket" shape="rect" coords="109,112,208,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="109,56,208,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="109,0,208,24"><area href="classPSocksSocket.html" alt="PSocksSocket" shape="rect" coords="54,280,153,304"><area href="classPTelnetSocket.html" alt="PTelnetSocket" shape="rect" coords="163,280,262,304"><area href="classPSocks4Socket.html" alt="PSocks4Socket" shape="rect" coords="0,336,99,360"><area href="classPSocks5Socket.html" alt="PSocks5Socket" shape="rect" coords="109,336,208,360"></map><a href="classPTCPSocket-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 Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#a0">Read</a> (void *buf, PINDEX len)</td></tr><tr><td colspan="2"><div class="groupHeader">Construction.</div></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_0">PTCPSocket</a> (WORD <a class="el" href="classPSocket.html#n0">port</a>=0)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_1">PTCPSocket</a> (const <a class="el" href="classPString.html">PString</a> &amp;service)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_2">PTCPSocket</a> (const <a class="el" href="classPString.html">PString</a> &amp;address, WORD <a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_3">PTCPSocket</a> (const <a class="el" href="classPString.html">PString</a> &amp;address, const <a class="el" href="classPString.html">PString</a> &amp;service)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_4">PTCPSocket</a> (<a class="el" href="classPSocket.html">PSocket</a> &amp;socket)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z423_5">PTCPSocket</a> (PTCPSocket &amp;tcpSocket)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject.</div></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPObject.html">PObject</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z425_0">Clone</a> () const</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PChannel.</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z427_0">Write</a> (const void *buf, PINDEX len)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PSocket.</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z429_0">Listen</a> (unsigned queueSize=5, WORD <a class="el" href="classPSocket.html#n0">port</a>=0, <a class="el" href="classPSocket.html#z369_0">Reusability</a> reuse=AddressIsExclusive)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z429_1">Listen</a> (const Address &amp;bind, unsigned queueSize=5, WORD <a class="el" href="classPSocket.html#n0">port</a>=0, <a class="el" href="classPSocket.html#z369_0">Reusability</a> reuse=AddressIsExclusive)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z429_2">Accept</a> (<a class="el" href="classPSocket.html">PSocket</a> &amp;socket)</td></tr><tr><td colspan="2"><div class="groupHeader">New functions for class.</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z431_0">WriteOutOfBand</a> (const void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#z431_1">OnOutOfBand</a> (const void *buf, PINDEX len)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#b0">OpenSocket</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#b1">OpenSocket</a> (int ipAdressFamily)</td></tr><tr><td nowrap align=right valign=top>virtual const char *&nbsp;</td><td valign=bottom><a class="el" href="classPTCPSocket.html#b2">GetProtocolName</a> () const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A socket that uses the TCP transport on the Internet Protocol. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="z423_0" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">WORD&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>port</em> = 0          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a TCP/IP protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.<p>Note that what looks like a "copy" constructor here is really a the accept of a "listening" socket the same as the <a class="el" href="classPSocket.html">PSocket</a> &amp; parameter version constructor. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>port</em>&nbsp;</td><td>Port number to use for the connection. </td></tr></table></dl>    </td>  </tr></table><a name="z423_1" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>service</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>service</em>&nbsp;</td><td>Service name to use for the connection. </td></tr></table></dl>    </td>  </tr></table><a name="z423_2" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>address</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>WORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>port</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>port</em>&nbsp;</td><td>Address of remote machine to connect to. Port number to use for the connection. </td></tr></table></dl>    </td>  </tr></table><a name="z423_3" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>address</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>service</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>service</em>&nbsp;</td><td>Address of remote machine to connect to. Service name to use for the connection. </td></tr></table></dl>    </td>  </tr></table><a name="z423_4" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPSocket.html">PSocket</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>socket</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>socket</em>&nbsp;</td><td>Listening socket making the connection. </td></tr></table></dl>    </td>  </tr></table><a name="z423_5" doxytag="PTCPSocket::PTCPSocket"></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"> PTCPSocket::PTCPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PTCPSocket &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>tcpSocket</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -