📄 classpsockssocket.html
字号:
<!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>PSocksSocket 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> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PSocksSocket Class Reference</h1><code>#include <<a class="el" href="socks_8h-source.html">socks.h</a>></code><p><p>Inheritance diagram for PSocksSocket:<p><center><img src="classPSocksSocket.png" usemap="#PSocksSocket_map" border="0" alt=""></center><map name="PSocksSocket_map"><area href="classPTCPSocket.html" alt="PTCPSocket" shape="rect" coords="0,224,101,248"><area href="classPSocksProtocol.html" alt="PSocksProtocol" shape="rect" coords="111,224,212,248"><area href="classPIPSocket.html" alt="PIPSocket" shape="rect" coords="0,168,101,192"><area href="classPSocket.html" alt="PSocket" shape="rect" coords="0,112,101,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,101,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,101,24"><area href="classPSocks4Socket.html" alt="PSocks4Socket" shape="rect" coords="0,336,101,360"><area href="classPSocks5Socket.html" alt="PSocks5Socket" shape="rect" coords="111,336,212,360"></map><a href="classPSocksSocket-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> </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a0">PSocksSocket</a> (WORD <a class="el" href="classPSocket.html#n0">port</a>=0)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a1">Connect</a> (const <a class="el" href="classPString.html">PString</a> &address)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a2">Connect</a> (const Address &addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a3">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>BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a4">Accept</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a5">Accept</a> (<a class="el" href="classPSocket.html">PSocket</a> &socket)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a6">GetLocalAddress</a> (Address &addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a7">GetLocalAddress</a> (Address &addr, WORD &<a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a8">GetPeerAddress</a> (Address &addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksSocket.html#a9">GetPeerAddress</a> (Address &addr, WORD &<a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPSocksSocket.html#b0">SetErrorCodes</a> (<a class="el" href="classPChannel.html#z55_0">PChannel::Errors</a> errCode, int osErr)</td></tr><tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classPSocksSocket.html#b1">TransferHandle</a> (PSocksSocket &destination)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This is an ancestor class allowing access to a SOCKS servers (version 4 and 5). <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PSocksSocket::PSocksSocket"></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"> PSocksSocket::PSocksSocket </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">WORD </td> <td class="mdname1" valign="top" nowrap> <em>port</em> = 0 </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><hr><h2>Member Function Documentation</h2><a name="a5" doxytag="PSocksSocket::Accept"></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 PSocksSocket::Accept </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPSocket.html">PSocket</a> & </td> <td class="mdname1" valign="top" nowrap> <em>socket</em> </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>Open a socket to a remote host on the specified port number. This is an "accepting" socket. When a "listening" socket has a pending connection to make, this will accept a connection made by the "connecting" socket created to establish a link.<p>The port that the socket uses is the one used in the <a class="el" href="classPSocksSocket.html#a3">Listen()</a># command of the socket# parameter.<p>Note that this function will block until a remote system connects to the port number specified in the "listening" socket.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully opened. </dl><p>Reimplemented from <a class="el" href="classPTCPSocket.html#z429_2">PTCPSocket</a>. </td> </tr></table><a name="a4" doxytag="PSocksSocket::Accept"></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"> BOOL PSocksSocket::Accept </td> <td class="md" valign="top">( </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>Open a socket to a remote host on the specified port number. This is an "accepting" socket. When a "listening" socket has a pending connection to make, this will accept a connection made by the "connecting" socket created to establish a link.<p>The port that the socket uses is the one used in the <A><a class="el" href="classPSocksSocket.html#a3">Listen()</a> command of the <code>socket</code> parameter.<p>Note that this function will block until a remote system connects to the port number specified in the "listening" socket.<p>A further note is that when the version that uses a parameter is used, the <code>socket</code> parameter is automatically closed and its operating system handle transferred to the current object. This occurs regardless of the return value of the function.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully opened. </dl> </td> </tr></table><a name="a2" doxytag="PSocksSocket::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 PSocksSocket::Connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const Address & </td> <td class="mdname1" valign="top" nowrap> <em>addr</em> </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><p>Reimplemented from <a class="el" href="classPIPSocket.html#a3">PIPSocket</a>. </td> </tr></table><a name="a1" doxytag="PSocksSocket::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 PSocksSocket::Connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>address</em> </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>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 <A><a class="el" href="classPSocket.html#z373_2">PIPSocket::SetPort()</a> function.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully connected to the remote host. </dl><p>Reimplemented from <a class="el" href="classPIPSocket.html#a2">PIPSocket</a>. </td> </tr></table><a name="a7" doxytag="PSocksSocket::GetLocalAddress"></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 PSocksSocket::GetLocalAddress </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">Address & </td> <td class="mdname" nowrap> <em>addr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>WORD & </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -