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

📄 classpinternetprotocol.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>PInternetProtocol 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>PInternetProtocol Class Reference</h1><code>#include &lt;<a class="el" href="inetprot_8h-source.html">inetprot.h</a>&gt;</code><p><p>Inheritance diagram for PInternetProtocol:<p><center><img src="classPInternetProtocol.png" usemap="#PInternetProtocol_map" border="0" alt=""></center><map name="PInternetProtocol_map"><area href="classPIndirectChannel.html" alt="PIndirectChannel" shape="rect" coords="357,112,466,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="357,56,466,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="357,0,466,24"><area href="classPFTP.html" alt="PFTP" shape="rect" coords="0,224,109,248"><area href="classPHTTP.html" alt="PHTTP" shape="rect" coords="238,224,347,248"><area href="classPPOP3.html" alt="PPOP3" shape="rect" coords="476,224,585,248"><area href="classPSMTP.html" alt="PSMTP" shape="rect" coords="714,224,823,248"><area href="classPFTPClient.html" alt="PFTPClient" shape="rect" coords="119,280,228,304"><area href="classPFTPServer.html" alt="PFTPServer" shape="rect" coords="119,336,228,360"><area href="classPHTTPClient.html" alt="PHTTPClient" shape="rect" coords="357,280,466,304"><area href="classPHTTPServer.html" alt="PHTTPServer" shape="rect" coords="357,336,466,360"><area href="classPPOP3Client.html" alt="PPOP3Client" shape="rect" coords="595,280,704,304"><area href="classPPOP3Server.html" alt="PPOP3Server" shape="rect" coords="595,336,704,360"><area href="classPSMTPClient.html" alt="PSMTPClient" shape="rect" coords="833,280,942,304"><area href="classPSMTPServer.html" alt="PSMTPServer" shape="rect" coords="833,336,942,360"></map><a href="classPInternetProtocol-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 BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a0">Read</a> (void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a1">Write</a> (const void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a2">SetReadLineTimeout</a> (const <a class="el" href="classPTimeInterval.html">PTimeInterval</a> &amp;t)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a3">Connect</a> (const <a class="el" href="classPString.html">PString</a> &amp;address, WORD port=0)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a4">Connect</a> (const <a class="el" href="classPString.html">PString</a> &amp;address, const <a class="el" href="classPString.html">PString</a> &amp;service)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a5">Accept</a> (<a class="el" href="classPSocket.html">PSocket</a> &amp;listener)</td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a6">GetDefaultService</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPIPSocket.html">PIPSocket</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a7">GetSocket</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a8">WriteLine</a> (const <a class="el" href="classPString.html">PString</a> &amp;line)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a9">ReadLine</a> (<a class="el" href="classPString.html">PString</a> &amp;line, BOOL allowContinuation=FALSE)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a10">UnRead</a> (int ch)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a11">UnRead</a> (const <a class="el" href="classPString.html">PString</a> &amp;str)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a12">UnRead</a> (const void *buffer, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a13">WriteCommand</a> (PINDEX cmdNumber)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a14">WriteCommand</a> (PINDEX cmdNumber, const <a class="el" href="classPString.html">PString</a> &amp;param)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a15">ReadCommand</a> (PINDEX &amp;num, <a class="el" href="classPString.html">PString</a> &amp;args)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a16">WriteResponse</a> (unsigned numericCode, const <a class="el" href="classPString.html">PString</a> &amp;info)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a17">WriteResponse</a> (const <a class="el" href="classPString.html">PString</a> &amp;code, const <a class="el" href="classPString.html">PString</a> &amp;info)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a18">ReadResponse</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a19">ReadResponse</a> (int &amp;code, <a class="el" href="classPString.html">PString</a> &amp;info)</td></tr><tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a20">ExecuteCommand</a> (PINDEX cmdNumber)</td></tr><tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a21">ExecuteCommand</a> (PINDEX cmdNumber, const <a class="el" href="classPString.html">PString</a> &amp;param)</td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#a22">GetLastResponseCode</a> () const</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="classPInternetProtocol.html#a23">GetLastResponseInfo</a> () const</td></tr><tr><td colspan=2><br><h2>Protected Types</h2></td></tr><tr><td nowrap align=right valign=top>enum &nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#t6">StuffState</a> { <br>&nbsp;&nbsp;<a class="el" href="classPInternetProtocol.html#t6t0">DontStuff</a>, <a class="el" href="classPInternetProtocol.html#t6t1">StuffIdle</a>, <a class="el" href="classPInternetProtocol.html#t6t2">StuffCR</a>, <a class="el" href="classPInternetProtocol.html#t6t3">StuffCRLF</a>, <br>&nbsp;&nbsp;<a class="el" href="classPInternetProtocol.html#t6t4">StuffCRLFdot</a>, <a class="el" href="classPInternetProtocol.html#t6t5">StuffCRLFdotCR</a><br> }</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="classPInternetProtocol.html#b0">PInternetProtocol</a> (const char *<a class="el" href="classPInternetProtocol.html#n0">defaultServiceName</a>, PINDEX cmdCount, char const *const *cmdNames)</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#b1">ParseResponse</a> (const <a class="el" href="classPString.html">PString</a> &amp;line)</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>&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n0">defaultServiceName</a></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="classPInternetProtocol.html#n1">commandNames</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPCharArray.html">PCharArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n2">unReadBuffer</a></td></tr><tr><td nowrap align=right valign=top>PINDEX&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n3">unReadCount</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTimeInterval.html">PTimeInterval</a>&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n4">readLineTimeout</a></td></tr><tr><td nowrap align=right valign=top>enum <a class="el" href="classPInternetProtocol.html#t6">PInternetProtocol::StuffState</a>&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n5">stuffingState</a></td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n6">newLineToCRLF</a></td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classPInternetProtocol.html#n7">lastResponseCode</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="classPInternetProtocol.html#n8">lastResponseInfo</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A TCP/IP socket for process/application layer high level protocols. All of these protocols execute commands and responses in a standard manner.<p>A command consists of a line starting with a short, case insensitive command string terminated by a space or the end of the line. This may be followed by optional arguments.<p>A response to a command is usually a number and/or a short string eg "OK". The response may be followed by additional information about the response but this is not typically used by the protocol. It is only for user information and may be tracked in log files etc.<p>All command and reponse lines of the protocol are terminated by a CR/LF pair. A command or response line may be followed by additional data as determined by the protocol, but this data is "outside" the protocol specification as defined by this class.<p>The default read timeout is to 10 minutes by the constructor. <p><hr><h2>Member Enumeration Documentation</h2><a name="t6" doxytag="PInternetProtocol::StuffState"></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"> enum PInternetProtocol::StuffState<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </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="t6t0" doxytag="DontStuff"></a><em>DontStuff</em></em>&nbsp;</td><td></td></tr><tr><td valign=top><em><a name="t6t1" doxytag="StuffIdle"></a><em>StuffIdle</em></em>&nbsp;</td><td></td></tr><tr><td valign=top><em><a name="t6t2" doxytag="StuffCR"></a><em>StuffCR</em></em>&nbsp;</td><td></td></tr><tr><td valign=top><em><a name="t6t3" doxytag="StuffCRLF"></a><em>StuffCRLF</em></em>&nbsp;</td><td></td></tr><tr><td valign=top><em><a name="t6t4" doxytag="StuffCRLFdot"></a><em>StuffCRLFdot</em></em>&nbsp;</td><td></td></tr><tr><td valign=top><em><a name="t6t5" doxytag="StuffCRLFdotCR"></a><em>StuffCRLFdotCR</em></em>&nbsp;</td><td></td></tr></table></dl>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="b0" doxytag="PInternetProtocol::PInternetProtocol"></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"> PInternetProtocol::PInternetProtocol </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>defaultServiceName</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>cmdCount</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>char const *const *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>cmdNames</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><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="a5" doxytag="PInternetProtocol::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 PInternetProtocol::Accept </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPSocket.html">PSocket</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>listener</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>Accept a server socket to a remote host for the internet protocol.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully connected to the remote host. </dl>    </td>  </tr></table><a name="a4" doxytag="PInternetProtocol::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 PInternetProtocol::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="mdname" nowrap>&nbsp; <em>address</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>service</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>    </td>  </tr></table><a name="a3" doxytag="PInternetProtocol::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 PInternetProtocol::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="mdname" nowrap>&nbsp; <em>address</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>WORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>port</em> = 0</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>Connect a socket to a remote host for the internet protocol.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was successfully connected to the remote host. </dl>    </td>  </tr></table><a name="a21" doxytag="PInternetProtocol::ExecuteCommand"></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 int PInternetProtocol::ExecuteCommand </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>cmdNumber</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>param</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>    </td>  </tr></table><a name="a20" doxytag="PInternetProtocol::ExecuteCommand"></a><p>

⌨️ 快捷键说明

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