📄 classpion_1_1_h_t_t_p_server.html
字号:
<a class="anchor" name="bb4bab0c980efa48976f3982c85db100"></a><!-- doxytag: member="pion::HTTPServer::addModule" ref="bb4bab0c980efa48976f3982c85db100" args="(const std::string &resource, HTTPModule *module_ptr)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPServer::addModule </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>resource</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classpion_1_1_h_t_t_p_module.html">HTTPModule</a> * </td> <td class="paramname"> <em>module_ptr</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>adds a new module to the HTTP server<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>resource</em> </td><td>the resource name or uri-stem to bind to the module </td></tr> <tr><td valign="top"></td><td valign="top"><em>module_ptr</em> </td><td>a pointer to the module </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00127">127</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_module_8hpp-source.html#l00074">pion::HTTPModule::getResource()</a>, and <a class="el" href="_h_t_t_p_module_8hpp-source.html#l00071">pion::HTTPModule::setResource()</a>.</div></div><p><a class="anchor" name="95bd8a7c5882d19cd203f902aa8924cf"></a><!-- doxytag: member="pion::HTTPServer::loadModule" ref="95bd8a7c5882d19cd203f902aa8924cf" args="(const std::string &resource, const std::string &module_name)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPServer::loadModule </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>resource</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>module_name</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>loads a module from a shared object file<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>resource</em> </td><td>the resource name or uri-stem to bind to the module </td></tr> <tr><td valign="top"></td><td valign="top"><em>module_name</em> </td><td>the name of the module to load (searches plug-in directories and appends extensions) </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00136">136</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_pion_plugin_8hpp-source.html#l00316">pion::PionPluginPtr< InterfaceClassType >::create()</a>, <a class="el" href="_pion_plugin_8hpp-source.html#l00073">pion::PionPlugin::findPluginFile()</a>, <a class="el" href="_t_c_p_server_8hpp-source.html#l00093">pion::TCPServer::m_logger</a>, and <a class="el" href="_pion_plugin_8cpp-source.html#l00076">pion::PionPlugin::open()</a>.<p>Referenced by <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00178">loadModuleConfig()</a>.</div></div><p><a class="anchor" name="ae48d9e0433e0b956b13513597c57655"></a><!-- doxytag: member="pion::HTTPServer::setModuleOption" ref="ae48d9e0433e0b956b13513597c57655" args="(const std::string &resource, const std::string &name, const std::string &value)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPServer::setModuleOption </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>resource</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>sets a configuration options for the module associated with resource<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>resource</em> </td><td>the resource name or uri-stem that identifies the module </td></tr> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>the name of the configuration option </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>the value to set the option to </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00161">161</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#l00178">loadModuleConfig()</a>.</div></div><p><a class="anchor" name="2cc8edf6440a62b1582ff7162a9dc067"></a><!-- doxytag: member="pion::HTTPServer::loadModuleConfig" ref="2cc8edf6440a62b1582ff7162a9dc067" args="(const std::string &config_name)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPServer::loadModuleConfig </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>config_name</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Parses a simple module configuration file. Each line in the file starts with one of the following commands:<p>path VALUE : adds a directory to the module search path module RESOURCE FILE : loads module bound to RESOURCE from FILE option RESOURCE NAME=VALUE : sets module option NAME to VALUE<p>Blank lines or lines that begin with # are ignored as comments.<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>config_name</em> </td><td>the name of the config file to parse </td></tr> </table></dl><p>Definition at line <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00178">178</a> of file <a class="el" href="_h_t_t_p_server_8cpp-source.html">HTTPServer.cpp</a>.<p>References <a class="el" href="_pion_plugin_8cpp-source.html#l00051">pion::PionPlugin::addPluginDirectory()</a>, <a class="el" href="_pion_plugin_8hpp-source.html#l00086">pion::PionPlugin::findConfigFile()</a>, <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00136">loadModule()</a>, and <a class="el" href="_h_t_t_p_server_8cpp-source.html#l00161">setModuleOption()</a>.</div></div><p><a class="anchor" name="8d56ea8d41de7e5cfb3ce17addbd0a8b"></a><!-- doxytag: member="pion::HTTPServer::handleConnection" ref="8d56ea8d41de7e5cfb3ce17addbd0a8b" args="(TCPConnectionPtr &tcp_conn)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pion::HTTPServer::handleConnection </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacepion.html#1858b89656b28c6498ad9efd6b7e9d41">TCPConnectionPtr</a> & </td> <td class="paramname"> <em>tcp_conn</em> </td> <td> ) </td> <td width="100%"><code> [protected, virtual]</code></td> </tr> </table></div><div class="memdoc"><p>handles a new TCP connection<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>tcp_conn</em> </td><td>the new TCP connection to handle </td></tr> </table></dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -