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

📄 classpion_1_1_h_t_t_p_server.html

📁 用c++编写http server的源码库,对socket等网络处理的代码可迅速转为己用.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p>Reimplemented from <a class="el" href="classpion_1_1_t_c_p_server.html#bdf3bb235cf282e635dcd620fe17f448">pion::TCPServer</a>.<p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00023">23</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_h_t_t_p_request_parser_8hpp-source.html#l00048">pion::HTTPRequestParser::create()</a>, and <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00031">handleRequest()</a>.</div></div><p><a class="anchor" name="ce510154e117873d528e04bbf6f30d5b"></a><!-- doxytag: member="pion::HTTPServer::handleRequest" ref="ce510154e117873d528e04bbf6f30d5b" args="(HTTPRequestPtr &amp;http_request, TCPConnectionPtr &amp;tcp_conn)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPServer::handleRequest           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>http_request</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>tcp_conn</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>handles a new HTTP request<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>http_request</em>&nbsp;</td><td>the HTTP request to handle </td></tr>    <tr><td valign="top"></td><td valign="top"><em>tcp_conn</em>&nbsp;</td><td>TCP connection containing a new request </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00031">31</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_t_c_p_server_8hpp-source.html#l00093">pion::TCPServer::m_logger</a>.<p>Referenced by <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00023">handleConnection()</a>.</div></div><p><a class="anchor" name="aec0c406558aa20ccc076db57fdae0ee"></a><!-- doxytag: member="pion::HTTPServer::handleBadRequest" ref="aec0c406558aa20ccc076db57fdae0ee" args="(HTTPRequestPtr &amp;http_request, TCPConnectionPtr &amp;tcp_conn)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPServer::handleBadRequest           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>http_request</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>tcp_conn</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>used to send responses when a bad HTTP request is made<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>http_request</em>&nbsp;</td><td>the new HTTP request to handle </td></tr>    <tr><td valign="top"></td><td valign="top"><em>tcp_conn</em>&nbsp;</td><td>the TCP connection that has the new request </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00311">311</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00040">pion::HTTPResponse::create()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00067">pion::HTTPTypes::RESPONSE_CODE_BAD_REQUEST</a>, and <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00060">pion::HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST</a>.</div></div><p><a class="anchor" name="bafcdd0c6b9533433e57821c5a312972"></a><!-- doxytag: member="pion::HTTPServer::handleNotFoundRequest" ref="bafcdd0c6b9533433e57821c5a312972" args="(HTTPRequestPtr &amp;http_request, TCPConnectionPtr &amp;tcp_conn)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPServer::handleNotFoundRequest           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>http_request</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>tcp_conn</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>used to send responses when no modules can handle the request<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>http_request</em>&nbsp;</td><td>the new HTTP request to handle </td></tr>    <tr><td valign="top"></td><td valign="top"><em>tcp_conn</em>&nbsp;</td><td>the TCP connection that has the new request </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00328">328</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00040">pion::HTTPResponse::create()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00065">pion::HTTPTypes::RESPONSE_CODE_NOT_FOUND</a>, and <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00058">pion::HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND</a>.</div></div><p><a class="anchor" name="dfa99550f6ce2e3be147904b32e077e5"></a><!-- doxytag: member="pion::HTTPServer::handleServerError" ref="dfa99550f6ce2e3be147904b32e077e5" args="(HTTPRequestPtr &amp;http_request, TCPConnectionPtr &amp;tcp_conn, const std::string &amp;error_msg)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void pion::HTTPServer::handleServerError           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>http_request</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>tcp_conn</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>error_msg</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>used to send responses when a server error occurs<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>http_request</em>&nbsp;</td><td>the new HTTP request to handle </td></tr>    <tr><td valign="top"></td><td valign="top"><em>tcp_conn</em>&nbsp;</td><td>the TCP connection that has the new request </td></tr>    <tr><td valign="top"></td><td valign="top"><em>error_msg</em>&nbsp;</td><td>message that explains what went wrong </td></tr>  </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00349">349</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_h_t_t_p_response_8hpp-source.html#l00040">pion::HTTPResponse::create()</a>, <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00068">pion::HTTPTypes::RESPONSE_CODE_SERVER_ERROR</a>, and <a class="el" href="_h_t_t_p_types_8hpp-source.html#l00061">pion::HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR</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_server_8hpp-source.html">HTTPServer.hpp</a><li>/Users/mdickey/code/libpion-export/src/<a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.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 + -