📄 classpsocksudpsocket.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>PSocksUDPSocket 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>PSocksUDPSocket Class Reference</h1><code>#include <<a class="el" href="socks_8h-source.html">socks.h</a>></code><p><p>Inheritance diagram for PSocksUDPSocket:<p><center><img src="classPSocksUDPSocket.png" usemap="#PSocksUDPSocket_map" border="0" alt=""></center><map name="PSocksUDPSocket_map"><area href="classPUDPSocket.html" alt="PUDPSocket" shape="rect" coords="0,280,123,304"><area href="classPSocksProtocol.html" alt="PSocksProtocol" shape="rect" coords="133,280,256,304"><area href="classPIPDatagramSocket.html" alt="PIPDatagramSocket" shape="rect" coords="0,224,123,248"><area href="classPIPSocket.html" alt="PIPSocket" shape="rect" coords="0,168,123,192"><area href="classPSocket.html" alt="PSocket" shape="rect" coords="0,112,123,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,123,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,123,24"></map><a href="classPSocksUDPSocket-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="classPSocksUDPSocket.html#a0">PSocksUDPSocket</a> (WORD <a class="el" href="classPSocket.html#n0">port</a>=0)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#a1">PSocksUDPSocket</a> (const <a class="el" href="classPString.html">PString</a> &host, WORD <a class="el" href="classPSocket.html#n0">port</a>=0)</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPObject.html">PObject</a> * </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#a2">Clone</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#a3">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="classPSocksUDPSocket.html#a4">Connect</a> (const Address &addr)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#a5">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 </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.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="classPSocksUDPSocket.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="classPSocksUDPSocket.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="classPSocksUDPSocket.html#a9">GetPeerAddress</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="classPSocksUDPSocket.html#a10">ReadFrom</a> (void *buf, PINDEX len, 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="classPSocksUDPSocket.html#a11">WriteTo</a> (const void *buf, PINDEX len, const 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="classPSocksUDPSocket.html#b0">SetErrorCodes</a> (<a class="el" href="classPChannel.html#z55_0">PChannel::Errors</a> errCode, int osErr)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTCPSocket.html">PTCPSocket</a> </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#n0">socksControl</a></td></tr><tr><td nowrap align=right valign=top>Address </td><td valign=bottom><a class="el" href="classPSocksUDPSocket.html#n1">serverAddress</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class allows access to RFC1928 compliant SOCKS server. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PSocksUDPSocket::PSocksUDPSocket"></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"> PSocksUDPSocket::PSocksUDPSocket </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><a name="a1" doxytag="PSocksUDPSocket::PSocksUDPSocket"></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"> PSocksUDPSocket::PSocksUDPSocket </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>host</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>WORD </td> <td class="mdname" nowrap> <em>port</em> = 0</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> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="PSocksUDPSocket::Clone"></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 <a class="el" href="classPObject.html">PObject</a>* PSocksUDPSocket::Clone </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a copy of the class on the heap. The exact semantics of the descendent class determine what is required to make a duplicate of the instance. Not all classes can even <em>do</em> a clone operation.<p>The main user of the clone function is the <A>PDictionary class as it requires copies of the dictionary keys.<p>The default behaviour is for this function to assert.<p><dl compact><dt><b>Returns: </b></dt><dd> pointer to new copy of the class instance. </dl><p>Reimplemented from <a class="el" href="classPObject.html#z203_0">PObject</a>. </td> </tr></table><a name="a4" doxytag="PSocksUDPSocket::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 PSocksUDPSocket::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="a3" doxytag="PSocksUDPSocket::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 PSocksUDPSocket::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="classPUDPSocket.html#z467_2">PUDPSocket</a>. </td> </tr></table><a name="a7" doxytag="PSocksUDPSocket::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 PSocksUDPSocket::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> <td><p><p>Reimplemented from <a class="el" href="classPIPSocket.html#a10">PIPSocket</a>. </td> </tr></table><a name="a6" doxytag="PSocksUDPSocket::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 PSocksUDPSocket::GetLocalAddress </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">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>Get the Internet Protocol address for the local host.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the IP number was returned. </dl><p>Reimplemented from <a class="el" href="classPIPSocket.html#a9">PIPSocket</a>. </td> </tr></table><a name="a9" doxytag="PSocksUDPSocket::GetPeerAddress"></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 PSocksUDPSocket::GetPeerAddress </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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -