You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

495 lines
34 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Webserv: Server Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Webserv
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a> &#124;
<a href="#pri-attribs">Private Attributes</a> </div>
<div class="headertitle"><div class="title">Server Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="Server_8hpp_source.html">Server.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Server:</div>
<div class="dyncontent">
<div class="center"><img src="classServer__inherit__graph.png" border="0" usemap="#aServer_inherit__map" alt="Inheritance graph"/></div>
<map name="aServer_inherit__map" id="aServer_inherit__map">
<area shape="rect" title=" " alt="" coords="5,79,69,104"/>
<area shape="rect" href="classRoute.html" title=" " alt="" coords="7,5,67,31"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for Server:</div>
<div class="dyncontent">
<div class="center"><img src="classServer__coll__graph.png" border="0" usemap="#aServer_coll__map" alt="Collaboration graph"/></div>
<map name="aServer_coll__map" id="aServer_coll__map">
<area shape="rect" title=" " alt="" coords="8,103,72,128"/>
<area shape="rect" href="classRoute.html" title=" " alt="" coords="56,200,116,225"/>
<area shape="rect" title=" " alt="" coords="50,5,109,31"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa7907c537140a174ab5096f7e25d9b40"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#aa7907c537140a174ab5096f7e25d9b40">Server</a> (<a class="el" href="classJSONNode.html">JSONNode</a> *server)</td></tr>
<tr class="memdesc:aa7907c537140a174ab5096f7e25d9b40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:aa7907c537140a174ab5096f7e25d9b40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a803b89b673283131d2ae765c82923f8d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a803b89b673283131d2ae765c82923f8d">~Server</a> (void)</td></tr>
<tr class="memdesc:a803b89b673283131d2ae765c82923f8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a803b89b673283131d2ae765c82923f8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c46d7b86956f508b1c0bfe125b03993"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classMaster.html">Master</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993">create_master</a> (string str)</td></tr>
<tr class="memdesc:a6c46d7b86956f508b1c0bfe125b03993"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classMaster.html">Master</a> socket safe creation. <br /></td></tr>
<tr class="separator:a6c46d7b86956f508b1c0bfe125b03993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5738134631f6bab9a26ca0687d86f21f"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classMaster.html">Master</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a5738134631f6bab9a26ca0687d86f21f">get_sockets</a> (<a class="el" href="classJSONNode.html">JSONNode</a> *server)</td></tr>
<tr class="memdesc:a5738134631f6bab9a26ca0687d86f21f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create server's defined sockets: <br /></td></tr>
<tr class="separator:a5738134631f6bab9a26ca0687d86f21f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0664c62a66a7e3e41d48c286c55a90a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classRoute.html">Route</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9">choose_route</a> (string uri)</td></tr>
<tr class="memdesc:a0664c62a66a7e3e41d48c286c55a90a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Choose the route an uri asked to the server. <br /></td></tr>
<tr class="separator:a0664c62a66a7e3e41d48c286c55a90a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab957b5aafbabdc8f108cf68bfb5968c9"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#ab957b5aafbabdc8f108cf68bfb5968c9">getName</a> (void)</td></tr>
<tr class="separator:ab957b5aafbabdc8f108cf68bfb5968c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classRoute"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classRoute')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classRoute.html">Route</a></td></tr>
<tr class="memitem:a3e7545442240c05dc562e2c9254c27ba inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a3e7545442240c05dc562e2c9254c27ba">Route</a> (<a class="el" href="classServer.html">Server</a> *server, string location, <a class="el" href="classJSONNode.html">JSONNode</a> *datas)</td></tr>
<tr class="memdesc:a3e7545442240c05dc562e2c9254c27ba inherit pub_methods_classRoute"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a3e7545442240c05dc562e2c9254c27ba inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c8cb0aaef581d3c14fff8ad99b3894f inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f">~Route</a> (void)</td></tr>
<tr class="memdesc:a6c8cb0aaef581d3c14fff8ad99b3894f inherit pub_methods_classRoute"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a6c8cb0aaef581d3c14fff8ad99b3894f inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a888d6e2bc84b59421e9909e075a6e8bb inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb">getLocation</a> (void)</td></tr>
<tr class="separator:a888d6e2bc84b59421e9909e075a6e8bb inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd1fe00a85e85ac4964f618f8f2d7bdf inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">getRoot</a> (void)</td></tr>
<tr class="separator:afd1fe00a85e85ac4964f618f8f2d7bdf inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9b27a012c16f0105b7c5caf25e033ef inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef">getReturn</a> (void)</td></tr>
<tr class="separator:af9b27a012c16f0105b7c5caf25e033ef inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af25f589b6b764829c3c98fcd952bf8ae inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classServer.html">Server</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#af25f589b6b764829c3c98fcd952bf8ae">getServer</a> (void)</td></tr>
<tr class="separator:af25f589b6b764829c3c98fcd952bf8ae inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa71b39273ba7bc2f683f40a6573ff810 inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">getIndex</a> (string uri, string path)</td></tr>
<tr class="memdesc:aa71b39273ba7bc2f683f40a6573ff810 inherit pub_methods_classRoute"><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for an index while generating autoindex. <br /></td></tr>
<tr class="separator:aa71b39273ba7bc2f683f40a6573ff810 inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5826254afb1e57c980c4b671bea8370a inherit pub_methods_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a5826254afb1e57c980c4b671bea8370a">correctUri</a> (string uri)</td></tr>
<tr class="memdesc:a5826254afb1e57c980c4b671bea8370a inherit pub_methods_classRoute"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the local path corresponding to the uri asked by te client. <br /></td></tr>
<tr class="separator:a5826254afb1e57c980c4b671bea8370a inherit pub_methods_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a6fecdbd597c344d2ae004ff72fdbef74"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="webserv_8hpp.html#aca8ca4c81e9d413f6c6f1f3dc74906b4">ip_port_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a6fecdbd597c344d2ae004ff72fdbef74">_listens</a></td></tr>
<tr class="memdesc:a6fecdbd597c344d2ae004ff72fdbef74"><td class="mdescLeft">&#160;</td><td class="mdescRight">The list of listens the server which are linked to the server. <br /></td></tr>
<tr class="separator:a6fecdbd597c344d2ae004ff72fdbef74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classRoute"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classRoute')"><img src="closed.png" alt="-"/>&#160;Data Fields inherited from <a class="el" href="classRoute.html">Route</a></td></tr>
<tr class="memitem:a59d3fd535c995846b0d81b69d9b268f1 inherit pub_attribs_classRoute"><td class="memItemLeft" align="right" valign="top"><a class="el" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">_indexs</a></td></tr>
<tr class="separator:a59d3fd535c995846b0d81b69d9b268f1 inherit pub_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3096f41064cf24c0c884d4c26f2fa07f inherit pub_attribs_classRoute"><td class="memItemLeft" align="right" valign="top"><a class="el" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">_allowed_methods</a></td></tr>
<tr class="separator:a3096f41064cf24c0c884d4c26f2fa07f inherit pub_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1688ba652b72bb3a1a0055e7e9cd3e41 inherit pub_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">std::map&lt; string, string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a></td></tr>
<tr class="separator:a1688ba652b72bb3a1a0055e7e9cd3e41 inherit pub_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a554deee37019d76b96a3411301b1d380 inherit pub_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a></td></tr>
<tr class="separator:a554deee37019d76b96a3411301b1d380 inherit pub_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a95c77245a1a0a9fd09926fc8e9661ebe"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#a95c77245a1a0a9fd09926fc8e9661ebe">_name</a></td></tr>
<tr class="memdesc:a95c77245a1a0a9fd09926fc8e9661ebe"><td class="mdescLeft">&#160;</td><td class="mdescRight">The server name. <br /></td></tr>
<tr class="separator:a95c77245a1a0a9fd09926fc8e9661ebe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebc8d22ef79e648de88441c37fb1db46"><td class="memItemLeft" align="right" valign="top">std::map&lt; string, <a class="el" href="classRoute.html">Route</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a></td></tr>
<tr class="memdesc:aebc8d22ef79e648de88441c37fb1db46"><td class="mdescLeft">&#160;</td><td class="mdescRight">The server's routings with a route object as object and his location as key. <br /></td></tr>
<tr class="separator:aebc8d22ef79e648de88441c37fb1db46"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classRoute"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classRoute')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classRoute.html">Route</a></td></tr>
<tr class="memitem:a0265e667aad49b2e6e3ca040ba7c8e06 inherit pro_attribs_classRoute"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classServer.html">Server</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a0265e667aad49b2e6e3ca040ba7c8e06">_server</a></td></tr>
<tr class="separator:a0265e667aad49b2e6e3ca040ba7c8e06 inherit pro_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e6bd355bcfd1c4110d300649291b58a inherit pro_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">_location</a></td></tr>
<tr class="separator:a7e6bd355bcfd1c4110d300649291b58a inherit pro_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56499c8c2520297a62e2a117475e9e7c inherit pro_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">_root</a></td></tr>
<tr class="separator:a56499c8c2520297a62e2a117475e9e7c inherit pro_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3f11aed02ce019d0d556230b119d217 inherit pro_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">_ret</a></td></tr>
<tr class="separator:ac3f11aed02ce019d0d556230b119d217 inherit pro_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b02eecb856d31da63cd1cd84600c43a inherit pro_attribs_classRoute"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">_autoindex</a></td></tr>
<tr class="separator:a9b02eecb856d31da63cd1cd84600c43a inherit pro_attribs_classRoute"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="Server_8hpp_source.html#l00004">4</a> of file <a class="el" href="Server_8hpp_source.html">Server.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa7907c537140a174ab5096f7e25d9b40" name="aa7907c537140a174ab5096f7e25d9b40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7907c537140a174ab5096f7e25d9b40">&#9670;&#160;</a></span>Server()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Server::Server </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classJSONNode.html">JSONNode</a> *&#160;</td>
<td class="paramname"><em>server</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
<p>The <a class="el" href="classRoute.html">Route</a> constructor scrap the routing informations (index, root, autoindex ...) and the <a class="el" href="classServer.html">Server</a> one the others ones (server_name, sub-routes)</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">server</td><td>A server block <a class="el" href="classJSONNode.html">JSONNode</a> get by parser. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00020">20</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_aa7907c537140a174ab5096f7e25d9b40_cgraph.png" border="0" usemap="#aclassServer_aa7907c537140a174ab5096f7e25d9b40_cgraph" alt=""/></div>
<map name="aclassServer_aa7907c537140a174ab5096f7e25d9b40_cgraph" id="aclassServer_aa7907c537140a174ab5096f7e25d9b40_cgraph">
<area shape="rect" title="Constructor." alt="" coords="5,5,120,31"/>
<area shape="rect" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9" title=" " alt="" coords="168,5,284,31"/>
</map>
</div>
</div>
</div>
<a id="a803b89b673283131d2ae765c82923f8d" name="a803b89b673283131d2ae765c82923f8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a803b89b673283131d2ae765c82923f8d">&#9670;&#160;</a></span>~Server()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Server::~Server </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
<p>Delete alocated routes. </p>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00038">38</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0664c62a66a7e3e41d48c286c55a90a9" name="a0664c62a66a7e3e41d48c286c55a90a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0664c62a66a7e3e41d48c286c55a90a9">&#9670;&#160;</a></span>choose_route()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classRoute.html">Route</a> * Server::choose_route </td>
<td>(</td>
<td class="paramtype">string&#160;</td>
<td class="paramname"><em>uri</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Choose the route an uri asked to the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">uri</td><td>The uri asked by the client to the server.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The route object choosen or the server itself if no location is found </dd></dl>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00102">102</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a0664c62a66a7e3e41d48c286c55a90a9_cgraph.png" border="0" usemap="#aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_cgraph" alt=""/></div>
<map name="aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_cgraph" id="aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_cgraph">
<area shape="rect" title="Choose the route an uri asked to the server." alt="" coords="5,5,164,31"/>
<area shape="rect" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3" title=" " alt="" coords="212,5,263,31"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a0664c62a66a7e3e41d48c286c55a90a9_icgraph.png" border="0" usemap="#aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_icgraph" alt=""/></div>
<map name="aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_icgraph" id="aclassServer_a0664c62a66a7e3e41d48c286c55a90a9_icgraph">
<area shape="rect" title="Choose the route an uri asked to the server." alt="" coords="395,5,553,31"/>
<area shape="rect" href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7" title=" " alt="" coords="196,5,347,31"/>
<area shape="rect" href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8" title=" " alt="" coords="5,5,148,31"/>
</map>
</div>
</div>
</div>
<a id="a6c46d7b86956f508b1c0bfe125b03993" name="a6c46d7b86956f508b1c0bfe125b03993"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c46d7b86956f508b1c0bfe125b03993">&#9670;&#160;</a></span>create_master()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classMaster.html">Master</a> * Server::create_master </td>
<td>(</td>
<td class="paramtype">string&#160;</td>
<td class="paramname"><em>str</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="classMaster.html">Master</a> socket safe creation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>a "ip:port" string</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classMaster.html">Master</a> socket object or NULL if the creation failed. </dd></dl>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00056">56</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a6c46d7b86956f508b1c0bfe125b03993_cgraph.png" border="0" usemap="#aclassServer_a6c46d7b86956f508b1c0bfe125b03993_cgraph" alt=""/></div>
<map name="aclassServer_a6c46d7b86956f508b1c0bfe125b03993_cgraph" id="aclassServer_a6c46d7b86956f508b1c0bfe125b03993_cgraph">
<area shape="rect" title="Master socket safe creation." alt="" coords="5,5,172,31"/>
<area shape="rect" href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358" title=" " alt="" coords="220,5,327,31"/>
<area shape="rect" href="tools_8cpp.html#a12c1f1864dfaa4d3ce407320c3877160" title=" " alt="" coords="375,5,443,31"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a6c46d7b86956f508b1c0bfe125b03993_icgraph.png" border="0" usemap="#aclassServer_a6c46d7b86956f508b1c0bfe125b03993_icgraph" alt=""/></div>
<map name="aclassServer_a6c46d7b86956f508b1c0bfe125b03993_icgraph" id="aclassServer_a6c46d7b86956f508b1c0bfe125b03993_icgraph">
<area shape="rect" title="Master socket safe creation." alt="" coords="328,5,495,31"/>
<area shape="rect" href="classServer.html#a5738134631f6bab9a26ca0687d86f21f" title="Create server&#39;s defined sockets:" alt="" coords="131,5,280,31"/>
<area shape="rect" href="classEnv.html#ace0ebeb150673fa69526c14d8417d587" title=" " alt="" coords="5,5,83,31"/>
</map>
</div>
</div>
</div>
<a id="a5738134631f6bab9a26ca0687d86f21f" name="a5738134631f6bab9a26ca0687d86f21f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5738134631f6bab9a26ca0687d86f21f">&#9670;&#160;</a></span>get_sockets()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; <a class="el" href="classMaster.html">Master</a> * &gt; Server::get_sockets </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classJSONNode.html">JSONNode</a> *&#160;</td>
<td class="paramname"><em>server</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create server's defined sockets: </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">server</td><td>A server block node from <a class="el" href="classJSONParser.html">JSONParser</a>.</td></tr>
</table>
</dd>
</dl>
<p>@retrn A vector containing all the succesfull created sockets using listens from the server block. </p>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00079">79</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a5738134631f6bab9a26ca0687d86f21f_cgraph.png" border="0" usemap="#aclassServer_a5738134631f6bab9a26ca0687d86f21f_cgraph" alt=""/></div>
<map name="aclassServer_a5738134631f6bab9a26ca0687d86f21f_cgraph" id="aclassServer_a5738134631f6bab9a26ca0687d86f21f_cgraph">
<area shape="rect" title="Create server&#39;s defined sockets:" alt="" coords="5,31,155,56"/>
<area shape="rect" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993" title="Master socket safe creation." alt="" coords="203,5,369,31"/>
<area shape="rect" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9" title=" " alt="" coords="228,55,344,80"/>
<area shape="rect" href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358" title=" " alt="" coords="417,5,524,31"/>
<area shape="rect" href="tools_8cpp.html#a12c1f1864dfaa4d3ce407320c3877160" title=" " alt="" coords="572,5,640,31"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classServer_a5738134631f6bab9a26ca0687d86f21f_icgraph.png" border="0" usemap="#aclassServer_a5738134631f6bab9a26ca0687d86f21f_icgraph" alt=""/></div>
<map name="aclassServer_a5738134631f6bab9a26ca0687d86f21f_icgraph" id="aclassServer_a5738134631f6bab9a26ca0687d86f21f_icgraph">
<area shape="rect" title="Create server&#39;s defined sockets:" alt="" coords="131,5,280,31"/>
<area shape="rect" href="classEnv.html#ace0ebeb150673fa69526c14d8417d587" title=" " alt="" coords="5,5,83,31"/>
</map>
</div>
</div>
</div>
<a id="ab957b5aafbabdc8f108cf68bfb5968c9" name="ab957b5aafbabdc8f108cf68bfb5968c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab957b5aafbabdc8f108cf68bfb5968c9">&#9670;&#160;</a></span>getName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">string Server::getName </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>The server name (server_name) </dd></dl>
<p class="definition">Definition at line <a class="el" href="Server_8cpp_source.html#l00047">47</a> of file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a id="a6fecdbd597c344d2ae004ff72fdbef74" name="a6fecdbd597c344d2ae004ff72fdbef74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fecdbd597c344d2ae004ff72fdbef74">&#9670;&#160;</a></span>_listens</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;<a class="el" href="webserv_8hpp.html#aca8ca4c81e9d413f6c6f1f3dc74906b4">ip_port_t</a>&gt; Server::_listens</td>
</tr>
</table>
</div><div class="memdoc">
<p>The list of listens the server which are linked to the server. </p>
<p class="definition">Definition at line <a class="el" href="Server_8hpp_source.html#l00009">9</a> of file <a class="el" href="Server_8hpp_source.html">Server.hpp</a>.</p>
</div>
</div>
<a id="a95c77245a1a0a9fd09926fc8e9661ebe" name="a95c77245a1a0a9fd09926fc8e9661ebe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95c77245a1a0a9fd09926fc8e9661ebe">&#9670;&#160;</a></span>_name</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">string Server::_name</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The server name. </p>
<p class="definition">Definition at line <a class="el" href="Server_8hpp_source.html#l00005">5</a> of file <a class="el" href="Server_8hpp_source.html">Server.hpp</a>.</p>
</div>
</div>
<a id="aebc8d22ef79e648de88441c37fb1db46" name="aebc8d22ef79e648de88441c37fb1db46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebc8d22ef79e648de88441c37fb1db46">&#9670;&#160;</a></span>_routes</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::map&lt;string, <a class="el" href="classRoute.html">Route</a> *&gt; Server::_routes</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The server's routings with a route object as object and his location as key. </p>
<p class="definition">Definition at line <a class="el" href="Server_8hpp_source.html#l00006">6</a> of file <a class="el" href="Server_8hpp_source.html">Server.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>includes/<a class="el" href="Server_8hpp_source.html">Server.hpp</a></li>
<li>srcs/load/<a class="el" href="Server_8cpp_source.html">Server.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>