📄 classpipxsocket.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>PIPXSocket 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>PIPXSocket Class Reference</h1><code>#include <<a class="el" href="ipxsock_8h-source.html">ipxsock.h</a>></code><p><p>Inheritance diagram for PIPXSocket:<p><center><img src="classPIPXSocket.png" usemap="#PIPXSocket_map" border="0" alt=""></center><map name="PIPXSocket_map"><area href="classPSocket.html" alt="PSocket" shape="rect" coords="0,112,83,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,83,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,83,24"><area href="classPSPXSocket.html" alt="PSPXSocket" shape="rect" coords="0,224,83,248"></map><a href="classPIPXSocket-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Address and name space look up functions</h2></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_0">GetLocalAddress</a> (<a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_1">GetLocalAddress</a> (<a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr, WORD &<a class="el" href="classPSocket.html#n0">port</a>)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_2">GetPeerAddress</a> (<a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_3">GetPeerAddress</a> (<a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr, WORD &<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> </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_4">GetHostName</a> (const <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_5">GetHostAddress</a> (<a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z167_6">GetHostAddress</a> (const <a class="el" href="classPString.html">PString</a> &hostname, <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &addr)</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="classPIPXSocket.html#a0">PIPXSocket</a> (WORD <a class="el" href="classPSocket.html#n0">port</a>=0)</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PChannel</div></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z163_0">GetName</a> () const</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 </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z165_0">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="classPIPXSocket.html#z165_1">Connect</a> (const <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &address)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z165_2">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 colspan="2"><div class="groupHeader">I/O functions</div></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z169_0">SetPacketType</a> (int type)</td></tr><tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z169_1">GetPacketType</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#z169_2">ReadFrom</a> (void *buf, PINDEX len, <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &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="classPIPXSocket.html#z169_3">WriteTo</a> (const void *buf, PINDEX len, const <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> &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 BOOL </td><td valign=bottom><a class="el" href="classPIPXSocket.html#b0">OpenSocket</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual const char * </td><td valign=bottom><a class="el" href="classPIPXSocket.html#b1">GetProtocolName</a> () const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class describes a type of socket that will communicate using the IPX/SPX protocols. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PIPXSocket::PIPXSocket"></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"> PIPXSocket::PIPXSocket </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>Create a new IPX datagram socket. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>port</em> </td><td>Port number to use for the connection. </td></tr></table></dl> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z165_1" doxytag="PIPXSocket::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 PIPXSocket::Connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPIPXSocket_1_1Address.html">Address</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 port number of the socket. 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> </td><td><a class="el" href="classPIPXSocket_1_1Address.html">Address</a> of remote machine to connect to. </td></tr></table></dl> </td> </tr></table><a name="z165_0" doxytag="PIPXSocket::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 PIPXSocket::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 port number of the socket. 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> </td><td><a class="el" href="classPIPXSocket_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>. </td> </tr></table><a name="z167_6" doxytag="PIPXSocket::GetHostAddress"></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 PIPXSocket::GetHostAddress </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>hostname</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPIPXSocket_1_1Address.html">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> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the IPX address for the specified host.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the IPX number was returned. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>addr</em> </td><td>Name of host to get address for. This may be either a server name or an IPX number in "colon" format. Variable to receive hosts IPX address </td></tr></table></dl> </td> </tr></table><a name="z167_5" doxytag="PIPXSocket::GetHostAddress"></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 PIPXSocket::GetHostAddress </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPIPXSocket_1_1Address.html">Address</a> & </td> <td class="mdname1" valign="top" nowrap> <em>addr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the IPX address for the specified host.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the IPX number was returned. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>addr</em> </td><td>Variable to receive this hosts IP address </td></tr></table></dl> </td> </tr></table><a name="z167_4" doxytag="PIPXSocket::GetHostName"></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"> <a class="el" href="classPString.html">PString</a> PIPXSocket::GetHostName </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPIPXSocket_1_1Address.html">Address</a> & </td> <td class="mdname1" valign="top" nowrap> <em>addr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</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 + -