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

📄 classpipsocket.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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>PIPSocket 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>PIPSocket Class Reference</h1><code>#include &lt;<a class="el" href="ipsock_8h-source.html">ipsock.h</a>&gt;</code><p><p>Inheritance diagram for PIPSocket:<p><center><img src="classPIPSocket.png" usemap="#PIPSocket_map" border="0" alt=""></center><map name="PIPSocket_map"><area href="classPSocket.html" alt="PSocket" shape="rect" coords="266,112,389,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="266,56,389,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="266,0,389,24"><area href="classPIPDatagramSocket.html" alt="PIPDatagramSocket" shape="rect" coords="66,224,189,248"><area href="classPTCPSocket.html" alt="PTCPSocket" shape="rect" coords="465,224,588,248"><area href="classPICMPSocket.html" alt="PICMPSocket" shape="rect" coords="0,280,123,304"><area href="classPUDPSocket.html" alt="PUDPSocket" shape="rect" coords="133,280,256,304"><area href="classPSocksSocket.html" alt="PSocksSocket" shape="rect" coords="399,280,522,304"><area href="classPTelnetSocket.html" alt="PTelnetSocket" shape="rect" coords="532,280,655,304"><area href="classPSocksUDPSocket.html" alt="PSocksUDPSocket" shape="rect" coords="66,336,189,360"><area href="classPSTUNUDPSocket.html" alt="PSTUNUDPSocket" shape="rect" coords="199,336,322,360"><area href="classPSocks4Socket.html" alt="PSocks4Socket" shape="rect" coords="332,336,455,360"><area href="classPSocks5Socket.html" alt="PSocks5Socket" shape="rect" coords="465,336,588,360"></map><a href="classPIPSocket-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 <a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a0">GetName</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a1">OpenSocket</a> (int ipAdressFamily=PF_INET)=0</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a2">Connect</a> (const <a class="el" href="classPString.html">PString</a> &amp;address)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a3">Connect</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a4">Connect</a> (WORD localPort, const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a5">Connect</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;iface, const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a6">Connect</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;iface, WORD localPort, const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a7">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="classPIPSocket.html#a8">Listen</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &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="classPIPSocket.html#a9">GetLocalAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a10">GetLocalAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr, WORD &amp;<a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a11">GetPeerAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a12">GetPeerAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr, WORD &amp;<a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a13">GetLocalHostName</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a14">GetPeerHostName</a> ()</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a15">PLIST</a> (RouteTable, <a class="el" href="classPIPSocket_1_1RouteEntry.html">RouteEntry</a>)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a16">PLIST</a> (InterfaceTable, <a class="el" href="classPIPSocket_1_1InterfaceEntry.html">InterfaceEntry</a>)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a17">SetCaptureReceiveToAddress</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#a18">GetLastReceiveToAddress</a> () const</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d0">GetDefaultIpAddressFamily</a> ()</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d1">SetDefaultIpAddressFamily</a> (int ipAdressFamily)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d2">SetDefaultIpAddressFamilyV4</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d3">GetDefaultIpAny</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d4">GetHostName</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d5">GetHostName</a> (const <a class="el" href="classPString.html">PString</a> &amp;hostname)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d6">GetHostName</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d7">GetHostAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d8">GetHostAddress</a> (const <a class="el" href="classPString.html">PString</a> &amp;hostname, <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringArray.html">PStringArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d9">GetHostAliases</a> (const <a class="el" href="classPString.html">PString</a> &amp;hostname)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringArray.html">PStringArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d10">GetHostAliases</a> (const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d11">IsLocalHost</a> (const <a class="el" href="classPString.html">PString</a> &amp;hostname)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d12">ClearNameCache</a> ()</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d13">GetGatewayAddress</a> (<a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;addr)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d14">GetGatewayInterface</a> ()</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d15">GetRouteTable</a> (RouteTable &amp;table)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#d16">GetInterfaceTable</a> (InterfaceTable &amp;table)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPIPSocket.html#b0">PIPSocket</a> ()</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class describes a type of socket that will communicate using the Internet Protocol. If P_USE_IPV6 is not set, IPv4 only is supported. If P_USE_IPV6 is set, both IPv4 and IPv6 adresses are supported, with  IPv4 as default. This allows to transparently use IPv4, IPv6 or Dual  stack operating systems. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="b0" doxytag="PIPSocket::PIPSocket"></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"> PIPSocket::PIPSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [protected]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="d12" doxytag="PIPSocket::ClearNameCache"></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"> void PIPSocket::ClearNameCache </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Clear the name (DNS) cache.     </td>  </tr></table><a name="a6" doxytag="PIPSocket::Connect"></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"> virtual BOOL PIPSocket::Connect </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>iface</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>WORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>localPort</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>addr</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></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>localPort</em>&nbsp;</td><td><a class="el" href="classPIPSocket_1_1Address.html">Address</a> of local interface to us. </td></tr><tr><td valign=top><em>addr</em>&nbsp;</td><td>Local port number for connection <a class="el" href="classPIPSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl>    </td>  </tr></table><a name="a5" doxytag="PIPSocket::Connect"></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"> virtual BOOL PIPSocket::Connect </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>iface</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>addr</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></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>addr</em>&nbsp;</td><td><a class="el" href="classPIPSocket_1_1Address.html">Address</a> of local interface to us. <a class="el" href="classPIPSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl>    </td>  </tr></table><a name="a4" doxytag="PIPSocket::Connect"></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"> virtual BOOL PIPSocket::Connect </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">WORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>localPort</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>addr</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></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>addr</em>&nbsp;</td><td>Local port number for connection <a class="el" href="classPIPSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl>    </td>  </tr></table><a name="a3" doxytag="PIPSocket::Connect"></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"> virtual BOOL PIPSocket::Connect </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPIPSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>addr</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></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>addr</em>&nbsp;</td><td><a class="el" href="classPIPSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl><p>Reimplemented in <a class="el" href="classPSocksSocket.html#a2">PSocksSocket</a>, and <a class="el" href="classPSocksUDPSocket.html#a4">PSocksUDPSocket</a>.    </td>  </tr></table><a name="a2" doxytag="PIPSocket::Connect"></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"> virtual BOOL PIPSocket::Connect </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>address</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Connect a socket to a remote host on the specified port number. This is typically used by the client or initiator of a communications channel. This connects to a "listening" socket at the other end of the communications channel.<p>The port number as defined by the object instance construction or the PIPSocket::SetPort()# function.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully connected to the remote host. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>address</em>&nbsp;</td><td><a class="el" href="classPIPSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPSocket.html#z369_1">PSocket</a>.<p>Reimplemented in <a class="el" href="classPUDPSocket.html#z467_2">PUDPSocket</a>, <a class="el" href="classPSocksSocket.html#a1">PSocksSocket</a>, <a class="el" href="classPSocksUDPSocket.html#a3">PSocksUDPSocket</a>, and <a class="el" href="classPTelnetSocket.html#a4">PTelnetSocket</a>.    </td>  </tr></table><a name="d0" doxytag="PIPSocket::GetDefaultIpAddressFamily"></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 PIPSocket::GetDefaultIpAddressFamily </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>

⌨️ 快捷键说明

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