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

📄 classpion_1_1_h_t_t_p_module.html

📁 用c++编写http server的源码库,对socket等网络处理的代码可迅速转为己用.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>libpion: pion::HTTPModule Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="namespaces.html"><span>Namespaces</span></a></li>    <li class="current"><a href="annotated.html"><span>Classes</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><div class="nav"><a class="el" href="namespacepion.html">pion</a>::<a class="el" href="classpion_1_1_h_t_t_p_module.html">HTTPModule</a></div><h1>pion::HTTPModule Class Reference</h1><!-- doxytag: class="pion::HTTPModule" --><code>#include &lt;<a class="el" href="_h_t_t_p_module_8hpp-source.html">HTTPModule.hpp</a>&gt;</code><p>Inherited by <a class="el" href="class_cookie_module.html">CookieModule</a>, <a class="el" href="class_echo_module.html">EchoModule</a>, <a class="el" href="class_file_module.html">FileModule</a>, <a class="el" href="class_hello_module.html">HelloModule</a>, and <a class="el" href="class_log_module.html">LogModule</a>.<p><a href="classpion_1_1_h_t_t_p_module-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="classpion_1_1_h_t_t_p_module.html">HTTPModule</a>: interface class for HTTP modules <p><p>Definition at line <a class="el" href="_h_t_t_p_module_8hpp-source.html#l00026">26</a> of file <a class="el" href="_h_t_t_p_module_8hpp-source.html">HTTPModule.hpp</a>.<table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="358332a4ee0995e43c031df6101da8c2"></a><!-- doxytag: member="pion::HTTPModule::HTTPModule" ref="358332a4ee0995e43c031df6101da8c2" args="(void)" -->&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#358332a4ee0995e43c031df6101da8c2">HTTPModule</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">default constructor <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22363dc9498c8c01a9f5693289b248f5"></a><!-- doxytag: member="pion::HTTPModule::~HTTPModule" ref="22363dc9498c8c01a9f5693289b248f5" args="()" -->virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#22363dc9498c8c01a9f5693289b248f5">~HTTPModule</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">virtual destructor <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#316354d4546e5f1ca1bc4531bb1b2fd9">handleRequest</a> (<a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;request, <a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> &amp;tcp_conn)=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#438852ea07e92aef908c633c2de9b8bc">setOption</a> (const std::string &amp;name, const std::string &amp;value)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4f5878a0690f7b84b53ea58365d743ad"></a><!-- doxytag: member="pion::HTTPModule::start" ref="4f5878a0690f7b84b53ea58365d743ad" args="(void)" -->virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#4f5878a0690f7b84b53ea58365d743ad">start</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">called when the module's server is starting <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="def44217f53d5684bf5f1c142ec7a337"></a><!-- doxytag: member="pion::HTTPModule::stop" ref="def44217f53d5684bf5f1c142ec7a337" args="(void)" -->virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#def44217f53d5684bf5f1c142ec7a337">stop</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">called when the module's server is stopping <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="108d617af983e75e52d7563d53571e7d"></a><!-- doxytag: member="pion::HTTPModule::setResource" ref="108d617af983e75e52d7563d53571e7d" args="(const std::string &amp;str)" -->void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#108d617af983e75e52d7563d53571e7d">setResource</a> (const std::string &amp;str)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">sets the URI stem or resource that is bound to the module (strips any trailing slash) <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aad5404f6bb1cdda1d75da7df1ca8022"></a><!-- doxytag: member="pion::HTTPModule::getResource" ref="aad5404f6bb1cdda1d75da7df1ca8022" args="(void) const " -->const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#aad5404f6bb1cdda1d75da7df1ca8022">getResource</a> (void) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns the URI stem or resource that is bound to the module <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d6371c2480fef34429845567067c072e"></a><!-- doxytag: member="pion::HTTPModule::getRelativeResource" ref="d6371c2480fef34429845567067c072e" args="(const std::string &amp;resource_requested) const " -->std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module.html#d6371c2480fef34429845567067c072e">getRelativeResource</a> (const std::string &amp;resource_requested) const </td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns the path to the resource requested, relative to the module's location <br></td></tr><tr><td colspan="2"><br><h2>Classes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpion_1_1_h_t_t_p_module_1_1_unknown_option_exception.html">UnknownOptionException</a></td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">exception thrown if the module does not recognize a configuration option  <a href="classpion_1_1_h_t_t_p_module_1_1_unknown_option_exception.html#_details">More...</a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="316354d4546e5f1ca1bc4531bb1b2fd9"></a><!-- doxytag: member="pion::HTTPModule::handleRequest" ref="316354d4546e5f1ca1bc4531bb1b2fd9" args="(HTTPRequestPtr &amp;request, TCPConnectionPtr &amp;tcp_conn)=0" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">virtual bool pion::HTTPModule::handleRequest           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="namespacepion.html#3c0f3fad0f449ebd309eaf4872f2b222">HTTPRequestPtr</a> &amp;&nbsp;</td>          <td class="paramname"> <em>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> [pure virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>attempts to handle 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>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><dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the request was handled; false if not </dd></dl><p>Implemented in <a class="el" href="class_cookie_module.html#089422fe106cb23a93ae7845215d174c">CookieModule</a>, <a class="el" href="class_echo_module.html#22e70c4559bfa2ac12ed88bbe870885f">EchoModule</a>, <a class="el" href="class_file_module.html#b9f46dabadef14ba1ca3b5698b310106">FileModule</a>, <a class="el" href="class_hello_module.html#537c646b34f5267063ddf649b83296d8">HelloModule</a>, and <a class="el" href="class_log_module.html#d5c937d81a2580cc13fc512b90cbfc35">LogModule</a>.</div></div><p><a class="anchor" name="438852ea07e92aef908c633c2de9b8bc"></a><!-- doxytag: member="pion::HTTPModule::setOption" ref="438852ea07e92aef908c633c2de9b8bc" args="(const std::string &amp;name, const std::string &amp;value)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">virtual void pion::HTTPModule::setOption           </td>          <td>(</td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>name</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const std::string &amp;&nbsp;</td>          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"><code> [inline, virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>sets a configuration option<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>name</em>&nbsp;</td><td>the name of the option to change </td></tr>    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>the value of the option </td></tr>  </table></dl><p>Reimplemented in <a class="el" href="class_file_module.html#e2bb1db0158386d16e5b6a9fb264f64e">FileModule</a>.<p>Definition at line <a class="el" href="_h_t_t_p_module_8hpp-source.html#l00060">60</a> of file <a class="el" href="_h_t_t_p_module_8hpp-source.html">HTTPModule.hpp</a>.</div></div><p><hr>The documentation for this class was generated from the following file:<ul><li>/Users/mdickey/code/libpion-export/include/libpion/<a class="el" href="_h_t_t_p_module_8hpp-source.html">HTTPModule.hpp</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 + -