📄 classpsocksprotocol.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>PSocksProtocol 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>PSocksProtocol Class Reference</h1><code>#include <<a class="el" href="socks_8h-source.html">socks.h</a>></code><p><p>Inheritance diagram for PSocksProtocol:<p><center><img src="classPSocksProtocol.png" usemap="#PSocksProtocol_map" border="0" alt=""></center><map name="PSocksProtocol_map"><area href="classPSocksSocket.html" alt="PSocksSocket" shape="rect" coords="63,56,180,80"><area href="classPSocksUDPSocket.html" alt="PSocksUDPSocket" shape="rect" coords="190,56,307,80"><area href="classPSocks4Socket.html" alt="PSocks4Socket" shape="rect" coords="0,112,117,136"><area href="classPSocks5Socket.html" alt="PSocks5Socket" shape="rect" coords="127,112,244,136"></map><a href="classPSocksProtocol-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 Types</h2></td></tr><tr><td nowrap align=right valign=top>enum </td><td valign=bottom>{ <a class="el" href="classPSocksProtocol.html#s1s0">DefaultServerPort</a> = 1080 }</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="classPSocksProtocol.html#a0">PSocksProtocol</a> (WORD port)</td></tr><tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#a1">~PSocksProtocol</a> ()</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#a2">SetServer</a> (const <a class="el" href="classPString.html">PString</a> &hostname, const char *service="socks 1080")</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#a3">SetServer</a> (const <a class="el" href="classPString.html">PString</a> &hostname, WORD port)</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#a4">SetAuthentication</a> (const <a class="el" href="classPString.html">PString</a> &username, const <a class="el" href="classPString.html">PString</a> &password)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#b0">ConnectSocksServer</a> (<a class="el" href="classPTCPSocket.html">PTCPSocket</a> &thisSocket)</td></tr><tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#b1">SetErrorCodes</a> (<a class="el" href="classPChannel.html#z55_0">PChannel::Errors</a> errCode, int osErr)=0</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#b2">SendSocksCommand</a> (<a class="el" href="classPTCPSocket.html">PTCPSocket</a> &socket, BYTE command, const char *hostname, <a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#b3">ReceiveSocksResponse</a> (<a class="el" href="classPTCPSocket.html">PTCPSocket</a> &socket, <a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> &addr, WORD &port)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n0">serverHost</a></td></tr><tr><td nowrap align=right valign=top>WORD </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n1">serverPort</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n2">authenticationUsername</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n3">authenticationPassword</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n4">remoteAddress</a></td></tr><tr><td nowrap align=right valign=top>WORD </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n5">remotePort</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n6">localAddress</a></td></tr><tr><td nowrap align=right valign=top>WORD </td><td valign=bottom><a class="el" href="classPSocksProtocol.html#n7">localPort</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Base class for implementing the SOCKS protocol for use with <a class="el" href="classPSocksSocket.html">PSocksSocket</a> and <a class="el" href="classPSocksUDPSocket.html">PSocksUDPSocket</a>. <p><hr><h2>Member Enumeration Documentation</h2><a name="s1" doxytag="PSocksProtocol::@24"></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"> anonymous enum </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="s1s0" doxytag="DefaultServerPort"></a><em>DefaultServerPort</em></em> </td><td></td></tr></table></dl> </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PSocksProtocol::PSocksProtocol"></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"> PSocksProtocol::PSocksProtocol </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">WORD </td> <td class="mdname1" valign="top" nowrap> <em>port</em> </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><a name="a1" doxytag="PSocksProtocol::~PSocksProtocol"></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 PSocksProtocol::~PSocksProtocol </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline, virtual]</code></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="b0" doxytag="PSocksProtocol::ConnectSocksServer"></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 PSocksProtocol::ConnectSocksServer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPTCPSocket.html">PTCPSocket</a> & </td> <td class="mdname1" valign="top" nowrap> <em>thisSocket</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> </td> </tr></table><a name="b3" doxytag="PSocksProtocol::ReceiveSocksResponse"></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 PSocksProtocol::ReceiveSocksResponse </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPTCPSocket.html">PTCPSocket</a> & </td> <td class="mdname" nowrap> <em>socket</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> & </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> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><p>Reimplemented in <a class="el" href="classPSocks4Socket.html#b1">PSocks4Socket</a>. </td> </tr></table><a name="b2" doxytag="PSocksProtocol::SendSocksCommand"></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 PSocksProtocol::SendSocksCommand </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPTCPSocket.html">PTCPSocket</a> & </td> <td class="mdname" nowrap> <em>socket</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BYTE </td> <td class="mdname" nowrap> <em>command</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>hostname</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPIPSocket_1_1Address.html">PIPSocket::Address</a> </td> <td class="mdname" nowrap> <em>addr</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><p>Reimplemented in <a class="el" href="classPSocks4Socket.html#b0">PSocks4Socket</a>. </td> </tr></table><a name="a4" doxytag="PSocksProtocol::SetAuthentication"></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 PSocksProtocol::SetAuthentication </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="mdname" nowrap> <em>username</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>password</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Set the username and password for the SOCKS server authentication. This is for the cleartext authentication only, GSSAPI, Kerberos etc is not yet supported. </td> </tr></table><a name="b1" doxytag="PSocksProtocol::SetErrorCodes"></a><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -