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

📄 classpion_1_1_h_t_t_p_request_parser.html

📁 用c++编写http server的源码库,对socket等网络处理的代码可迅速转为己用.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPRequestParser::readContentBytes           </td>          <td>(</td>          <td class="paramtype">const boost::system::error_code &amp;&nbsp;</td>          <td class="paramname"> <em>read_error</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">std::size_t&nbsp;</td>          <td class="paramname"> <em>bytes_read</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>Called after new request content bytes have been read<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>read_error</em>&nbsp;</td><td>error status from the last read operation </td></tr>    <tr><td valign="top"></td><td valign="top"><em>bytes_read</em>&nbsp;</td><td>number of bytes consumed by the last read operation </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00174">174</a> of file <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a>.<p>References <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00048">pion::HTTPTypes::CONTENT_TYPE_URLENCODED</a>, <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00224">handleReadError()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00038">pion::HTTPTypes::HEADER_CONTENT_TYPE</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00035">pion::HTTPTypes::HEADER_COOKIE</a>, <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00587">parseCookieHeader()</a>, and <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00522">parseURLEncoded()</a>.<p>Referenced by <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00056">readHeaderBytes()</a>.</div></div><p><a class="anchor" name="af553431fca527b6f1eb41489f7a7b1e"></a><!-- doxytag: member="pion::HTTPRequestParser::handleReadError" ref="af553431fca527b6f1eb41489f7a7b1e" args="(const boost::system::error_code &amp;read_error)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPRequestParser::handleReadError           </td>          <td>(</td>          <td class="paramtype">const boost::system::error_code &amp;&nbsp;</td>          <td class="paramname"> <em>read_error</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>Handles errors that occur during read operations<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>read_error</em>&nbsp;</td><td>error status from the last read operation </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00224">224</a> of file <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a>.<p>Referenced by <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00174">readContentBytes()</a>, and <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00056">readHeaderBytes()</a>.</div></div><p><a class="anchor" name="67d29971d989f532be4160153ff7d071"></a><!-- doxytag: member="pion::HTTPRequestParser::parseRequestHeaders" ref="67d29971d989f532be4160153ff7d071" args="(const char *&amp;ptr, const size_t len)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">boost::tribool pion::HTTPRequestParser::parseRequestHeaders           </td>          <td>(</td>          <td class="paramtype">const char *&amp;&nbsp;</td>          <td class="paramname"> <em>ptr</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const size_t&nbsp;</td>          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>parses request header bytes from the last read operation<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>points to the first byte read </td></tr>    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>number of bytes available for parsing</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>boost::tribool result of parsing </dd></dl><p>Definition at line <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00240">240</a> of file <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a>.<p>References <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00238">isChar()</a>, <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00243">isControl()</a>, <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00261">isDigit()</a>, and <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00248">isSpecial()</a>.<p>Referenced by <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00056">readHeaderBytes()</a>.</div></div><p><a class="anchor" name="57d7592db90c02bca8d57c9b27846bc8"></a><!-- doxytag: member="pion::HTTPRequestParser::parseURLEncoded" ref="57d7592db90c02bca8d57c9b27846bc8" args="(HTTPTypes::StringDictionary &amp;dict, const char *ptr, const size_t len)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">bool pion::HTTPRequestParser::parseURLEncoded           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structpion_1_1_h_t_t_p_types.html#c860abe7b994d3c0311318f2e335086e">HTTPTypes::StringDictionary</a> &amp;&nbsp;</td>          <td class="paramname"> <em>dict</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>ptr</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const size_t&nbsp;</td>          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [static, protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>parse key-value pairs out of a url-encoded string (i.e. this=that&amp;a=value)<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dict</em>&nbsp;</td><td>dictionary for key-values pairs </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>points to the start of the encoded string </td></tr>    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of the encoded string, in bytes</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>bool true if successful </dd></dl><p>Definition at line <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00522">522</a> of file <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a>.<p>References <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00243">isControl()</a>.<p>Referenced by <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00174">readContentBytes()</a>.</div></div><p><a class="anchor" name="0de32e9cf76ad689b6f86588c68e3118"></a><!-- doxytag: member="pion::HTTPRequestParser::parseCookieHeader" ref="0de32e9cf76ad689b6f86588c68e3118" args="(HTTPTypes::StringDictionary &amp;dict, const std::string &amp;cookie_header)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">bool pion::HTTPRequestParser::parseCookieHeader           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structpion_1_1_h_t_t_p_types.html#c860abe7b994d3c0311318f2e335086e">HTTPTypes::StringDictionary</a> &amp;&nbsp;</td>          <td class="paramname"> <em>dict</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>cookie_header</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [static, protected]</code></td>        </tr>      </table></div><div class="memdoc"><p>parse key-value pairs out of a "Cookie" request header (i.e. this=that; a=value)<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>dict</em>&nbsp;</td><td>dictionary for key-values pairs </td></tr>    <tr><td valign="top"></td><td valign="top"><em>cookie_header</em>&nbsp;</td><td>header string to be parsed</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>bool true if successful </dd></dl><p>Definition at line <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00587">587</a> of file <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a>.<p>References <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00243">isControl()</a>.<p>Referenced by <a class="el" href="_h_t_t_p_request_parser_8cpp-source.html#l00174">readContentBytes()</a>.</div></div><p><hr>The documentation for this class was generated from the following files:<ul><li>/Users/mdickey/code/libpion-export/include/libpion/<a class="el" href="_h_t_t_p_request_parser_8hpp-source.html">HTTPRequestParser.hpp</a><li>/Users/mdickey/code/libpion-export/src/<a class="el" href="_h_t_t_p_request_parser_8cpp-source.html">HTTPRequestParser.cpp</a></ul><hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 19 13:29:23 2007 for libpion by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>

⌨️ 快捷键说明

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