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

📄 classpinternetprotocol.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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="mdname1" valign="top" nowrap>&nbsp; <em>cmdNumber</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>Write a command to the socket, using <code><a class="el" href="classPInternetProtocol.html#a13">WriteCommand()</a></code> and await a response using <code><a class="el" href="classPInternetProtocol.html#a18">ReadResponse()</a></code>. The first character of the response is returned, as well as the entire response being saved into the protected member variables <code>lastResponseCode</code> and <code>lastResponseInfo</code>.<p>This function is typically used by client forms of the socket.<p><dl compact><dt><b>Returns: </b></dt><dd> First character of response string or '\0' if a socket error occurred. </dl>    </td>  </tr></table><a name="a6" doxytag="PInternetProtocol::GetDefaultService"></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"> const <a class="el" href="classPString.html">PString</a>&amp; PInternetProtocol::GetDefaultService </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the default service name or port number to use in socket connections.<p><dl compact><dt><b>Returns: </b></dt><dd> string for the default service name. </dl>    </td>  </tr></table><a name="a22" doxytag="PInternetProtocol::GetLastResponseCode"></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"> int PInternetProtocol::GetLastResponseCode </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Return the code associated with the last response received by the socket.<p><dl compact><dt><b>Returns: </b></dt><dd> Response code </dl>    </td>  </tr></table><a name="a23" doxytag="PInternetProtocol::GetLastResponseInfo"></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> PInternetProtocol::GetLastResponseInfo </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Return the last response received by the socket.<p><dl compact><dt><b>Returns: </b></dt><dd> Response as a string </dl>    </td>  </tr></table><a name="a7" doxytag="PInternetProtocol::GetSocket"></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="classPIPSocket.html">PIPSocket</a>* PInternetProtocol::GetSocket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the eventual socket for the series of indirect channels that may be between the current protocol and the actual I/O channel.<p>This will assert if the I/O channel is not an IP socket.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the string and CR/LF were completely written. </dl>    </td>  </tr></table><a name="b1" doxytag="PInternetProtocol::ParseResponse"></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 PINDEX PInternetProtocol::ParseResponse </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="mdname1" valign="top" nowrap>&nbsp; <em>line</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Parse a response line string into a response code and any extra info on the line. Results are placed into the member variables <code>lastResponseCode</code> and <code>lastResponseInfo</code>.<p>The default bahaviour looks for a space or a '-' and splits the code and info either side of that character, then returns FALSE.<p><dl compact><dt><b>Returns: </b></dt><dd> Position of continuation character in response, 0 if no continuation lines are possible. </dl><p>Reimplemented in <a class="el" href="classPHTTP.html#b1">PHTTP</a>, and <a class="el" href="classPPOP3.html#b1">PPOP3</a>.    </td>  </tr></table><a name="a0" doxytag="PInternetProtocol::Read"></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::Read </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>len</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>Low level read from the channel.<p>This override also supports the mechanism in the &lt;A&gt;<a class="el" href="classPInternetProtocol.html#a10">UnRead()</a> function allowing characters to be be "put back" into the data stream. This allows a look-ahead required by the logic of some protocols. This is completely independent of the standard iostream mechanisms which do not support the level of timeout control required by the protocols.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if at least len bytes were written to the channel. </dl><p>Reimplemented from <a class="el" href="classPIndirectChannel.html#z157_3">PIndirectChannel</a>.    </td>  </tr></table><a name="a15" doxytag="PInternetProtocol::ReadCommand"></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::ReadCommand </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>num</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>args</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>Read a single line of a command which ends with a CR/LF pair. The command number for the command name is parsed from the input, then the remaining text on the line is returned in the <code>args</code> parameter.<p>If the command does not match any of the command names then the entire line is placed in the <code>args</code> parameter and a value of P_MAX_INDEX is returned.<p>Note this function will block for the time specified by the &lt;A&gt;<a class="el" href="classPChannel.html#z49_0">PChannel::SetReadTimeout()</a> function.<p>This function is typically used by server forms of the socket.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if something was read, otherwise an I/O error occurred. </dl>    </td>  </tr></table><a name="a9" doxytag="PInternetProtocol::ReadLine"></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::ReadLine </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>line</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>BOOL&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>allowContinuation</em> = FALSE</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>Read a string from the socket channel up to a CR/LF pair.<p>If the <code>unstuffLine</code> parameter is set then the function will remove the '.' character from the start of any line that begins with two consecutive '.' characters. A line that has is exclusively a '.' character will make the function return FALSE.<p>Note this function will block for the time specified by the &lt;A&gt;<a class="el" href="classPChannel.html#z49_0">PChannel::SetReadTimeout()</a> function for only the first character in the line. The rest of the characters must each arrive within the time set by the <code>readLineTimeout</code> member variable. The timeout is set back to the original setting when the function returns.

⌨️ 快捷键说明

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