@ -1,2 +1,30 @@ |
|||
# Webserv |
|||
|
|||
[Subject](webserv.pdf) |
|||
|
|||
## ToDo/ToFix: |
|||
|
|||
- [] compare host and server_name for route choice |
|||
- [] organize answer structure |
|||
- [] default html pages (404, 503 ) ?? |
|||
- [] limit client body |
|||
- [] DELETE method |
|||
- [] POST method correctly |
|||
- [] hard test segmented request |
|||
- [] verify upload of files |
|||
- [] what to do with content ? |
|||
- [] CGI behavior |
|||
- [] based on files extensions |
|||
- [] |
|||
- [] STRESS TEST!! Server must stay available!! |
|||
- [] Server shout never indefinitly wait. |
|||
- [] PUT non-text file may finish because of eof char. |
|||
|
|||
## Behavior: |
|||
|
|||
### Configuration Parsing: |
|||
[![](https://mermaid.ink/img/pako:eNqFlG1vmzAQx78K8qu2IghSQotVpWq7N5vadEq2F9uYKgOXhBXsyJhpaZTvvsMOgXQki4SC7_-7Bx133pBEpEAoKRVT8CFjC8mKwe9hxH9c_LQGg7H1afY8-cxkCfLsnFqJ4POXeZYDZwVEXHsdINYm4hb-GndnVQtn58Zq-MbWsF1eLbPSUeIVePYGkrapGvAQMD7NyVmA-lIfmnxtzj6mm39XQx0O_1r79p9A6xVYNzfJUmQJjMedwvoy6PLQg36cONrztuNQn2tAt-M5_gWJotbD1-njt6PUY1Yiczed3vUyUuR5zJJXisXK0wCP_wPEQuQdohHaWmZKZnxxiphURQzyFHGPSYDxFun0oqXSd3rdheOqqeu4bqo6ru9qqoH3uhkBCaqSvHcIjIPppKaotWTlk5CgJ6LbTxNkP_Pt0NA1lL0cDiblwki7udyvkvl2Qr1McJ-Ntj82zmiLODoe7Ot-4olNCpAFy1K8DvRmREQtAXePUHxNYc6qXEUEQyDKKiVma54QqmQFNqlWaXuBEDpneYlWSDMl5JO5YvRNY5MV44RuyB9Ch77vjNxr79K_Gl27V0EQ2GRN6OAycHw3GLqhF7pe4AejrU3ehMCwnuMF4cgPQ3-ISoCPjvddi3Uh27-CXXGd?type=png)](https://mermaid.live/edit#pako:eNqFlG1vmzAQx78K8qu2IghSQotVpWq7N5vadEq2F9uYKgOXhBXsyJhpaZTvvsMOgXQki4SC7_-7Bx133pBEpEAoKRVT8CFjC8mKwe9hxH9c_LQGg7H1afY8-cxkCfLsnFqJ4POXeZYDZwVEXHsdINYm4hb-GndnVQtn58Zq-MbWsF1eLbPSUeIVePYGkrapGvAQMD7NyVmA-lIfmnxtzj6mm39XQx0O_1r79p9A6xVYNzfJUmQJjMedwvoy6PLQg36cONrztuNQn2tAt-M5_gWJotbD1-njt6PUY1Yiczed3vUyUuR5zJJXisXK0wCP_wPEQuQdohHaWmZKZnxxiphURQzyFHGPSYDxFun0oqXSd3rdheOqqeu4bqo6ru9qqoH3uhkBCaqSvHcIjIPppKaotWTlk5CgJ6LbTxNkP_Pt0NA1lL0cDiblwki7udyvkvl2Qr1McJ-Ntj82zmiLODoe7Ot-4olNCpAFy1K8DvRmREQtAXePUHxNYc6qXEUEQyDKKiVma54QqmQFNqlWaXuBEDpneYlWSDMl5JO5YvRNY5MV44RuyB9Ch77vjNxr79K_Gl27V0EQ2GRN6OAycHw3GLqhF7pe4AejrU3ehMCwnuMF4cgPQ3-ISoCPjvddi3Uh27-CXXGd) |
|||
|
|||
### Server fonctionment: |
|||
- set timeout. |
|||
|
|||
|
@ -0,0 +1,186 @@ |
|||
<!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: srcs/sock/Client.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_b0f7ce2339e35a0e5afcbb3929376e00.html">sock</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#func-members">Functions</a> </div> |
|||
<div class="headertitle"><div class="title">Client.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
|
|||
<p>The client sockets class which keep keep clients information and handle answer to them. |
|||
<a href="#details">More...</a></p> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Client.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Client_8cpp__incl.png" border="0" usemap="#asrcs_2sock_2Client_8cpp" alt=""/></div> |
|||
<map name="asrcs_2sock_2Client_8cpp" id="asrcs_2sock_2Client_8cpp"> |
|||
<area shape="rect" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Client_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a> |
|||
Functions</h2></td></tr> |
|||
<tr class="memitem:a11a04898e654ff6d1884f543f3051d23"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23">get_extension</a> (string str)</td></tr> |
|||
<tr class="separator:a11a04898e654ff6d1884f543f3051d23"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
|||
<div class="textblock"><p>The client sockets class which keep keep clients information and handle answer to them. </p> |
|||
<dl class="section author"><dt>Author</dt><dd>Narnaud </dd></dl> |
|||
<dl class="section version"><dt>Version</dt><dd>0.1 </dd></dl> |
|||
<dl class="section date"><dt>Date</dt><dd>2023-01-12 </dd></dl> |
|||
|
|||
<p class="definition">Definition in file <a class="el" href="Client_8cpp_source.html">Client.cpp</a>.</p> |
|||
</div><h2 class="groupheader">Function Documentation</h2> |
|||
<a id="a11a04898e654ff6d1884f543f3051d23" name="a11a04898e654ff6d1884f543f3051d23"></a> |
|||
<h2 class="memtitle"><span class="permalink"><a href="#a11a04898e654ff6d1884f543f3051d23">◆ </a></span>get_extension()</h2> |
|||
|
|||
<div class="memitem"> |
|||
<div class="memproto"> |
|||
<table class="mlabels"> |
|||
<tr> |
|||
<td class="mlabels-left"> |
|||
<table class="memname"> |
|||
<tr> |
|||
<td class="memname">string get_extension </td> |
|||
<td>(</td> |
|||
<td class="paramtype">string </td> |
|||
<td class="paramname"><em>str</em></td><td>)</td> |
|||
<td></td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
<td class="mlabels-right"> |
|||
<span class="mlabels"><span class="mlabel">inline</span></span> </td> |
|||
</tr> |
|||
</table> |
|||
</div><div class="memdoc"> |
|||
|
|||
<p class="definition">Definition at line <a class="el" href="Client_8cpp_source.html#l00010">10</a> of file <a class="el" href="Client_8cpp_source.html">Client.cpp</a>.</p> |
|||
<div class="dynheader"> |
|||
Here is the caller graph for this function:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Client_8cpp_a11a04898e654ff6d1884f543f3051d23_icgraph.png" border="0" usemap="#aClient_8cpp_a11a04898e654ff6d1884f543f3051d23_icgraph" alt=""/></div> |
|||
<map name="aClient_8cpp_a11a04898e654ff6d1884f543f3051d23_icgraph" id="aClient_8cpp_a11a04898e654ff6d1884f543f3051d23_icgraph"> |
|||
<area shape="rect" title=" " alt="" coords="219,5,333,31"/> |
|||
<area shape="rect" href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb" title=" " alt="" coords="5,5,171,31"/> |
|||
</map> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Client_8cpp = |
|||
[ |
|||
[ "get_extension", "Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23", null ] |
|||
]; |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/sock/Client.cpp" name="srcs/sock/Client.cpp"> |
|||
<area shape="rect" id="node1" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
19735a3baba2888dfddaead4e4f3b957 |
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,4 @@ |
|||
<map id="get_extension" name="get_extension"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="219,5,333,31"/> |
|||
<area shape="rect" id="node2" href="$classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb" title=" " alt="" coords="5,5,171,31"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
026541a6287640d028d716c1921070de |
After Width: | Height: | Size: 3.8 KiB |
@ -0,0 +1,374 @@ |
|||
<!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: srcs/sock/Client.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_b0f7ce2339e35a0e5afcbb3929376e00.html">sock</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Client.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Client_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23"> 10</a></span><span class="keyword">inline</span> <span class="keywordtype">string</span> <a class="code hl_function" href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23">get_extension</a>(<span class="keywordtype">string</span> str) {</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keywordtype">size_t</span> pos = str.rfind(<span class="charliteral">'.'</span>);</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keywordflow">if</span> (pos != string::npos)</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordflow">return</span> str.substr(pos);</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>}</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classClient.html#a084660f5c518a2fbd2e68411c0ef5ae8"> 18</a></span><a class="code hl_function" href="classClient.html#a084660f5c518a2fbd2e68411c0ef5ae8">Client::Client</a>(<span class="keywordtype">int</span> fd, <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> ip_port, <a class="code hl_class" href="classMaster.html">Master</a> *parent) : _fd(fd), _ip_port(ip_port), _parent(parent) {</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_function" href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">init</a>();</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> cout << <span class="stringliteral">"New connection, socket fd is "</span> << fd << <span class="stringliteral">", ip is : "</span> << <a class="code hl_variable" href="classClient.html#a7f318232807a0d483841ce22e1910bc7">_ip_port</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a> << <span class="stringliteral">", port : "</span> << <a class="code hl_variable" href="classClient.html#a7f318232807a0d483841ce22e1910bc7">_ip_port</a>.<a class="code hl_variable" href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">port</a> << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>}</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classClient.html#a66e3074e5f09c5e9bb4ec36bdea01c91"> 23</a></span><a class="code hl_function" href="classClient.html#a66e3074e5f09c5e9bb4ec36bdea01c91">Client::~Client</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> close(<a class="code hl_variable" href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">_fd</a>);</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> cout << <span class="stringliteral">"Host disconnected, ip "</span> << this-><a class="code hl_variable" href="classClient.html#a7f318232807a0d483841ce22e1910bc7">_ip_port</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a> << <span class="stringliteral">", port "</span> << this-><a class="code hl_variable" href="classClient.html#a7f318232807a0d483841ce22e1910bc7">_ip_port</a>.<a class="code hl_variable" href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">port</a> << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f"> 28</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">Client::init</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> this-><a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a> = NULL;</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> this-><a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a> = NULL;</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> this-><a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> = this-><a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a> = this-><a class="code hl_variable" href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">_host</a> = this-><a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a> = this-><a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a> = <span class="stringliteral">""</span>;</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> this-><a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> = 0;</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> this-><a class="code hl_variable" href="classClient.html#ad76783880af38b42a854937101819ad2">_last_chunk</a> = <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> this-><a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>.clear();</div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>}</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8"> 37</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8">Client::getRequest</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env, <span class="keywordtype">string</span> paquet) {</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">if</span> (paquet.length() < 1)</div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(403);</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">//if (DEBUG)</span></div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_function" href="debug_8cpp.html#afb2639655e07c91426064b6bdfff7079">debug_block</a>(<span class="stringliteral">"Paquet: "</span>, paquet);</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Method:"</span>, 0) != <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">getBody</a>(paquet);</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> lines = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(paquet, <span class="stringliteral">"\r\n"</span>);</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">for</span> (vec_string::iterator it = lines.begin(); it < lines.end(); it++) {</div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">size_t</span> pos = paquet.find(<span class="stringliteral">"\r\n"</span>);</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (pos != string::npos)</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> paquet.erase(0, pos + 2);</div> |
|||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> paquet.clear();</div> |
|||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a> += *it + (it + 1 != lines.end() ? <span class="stringliteral">"\r\n"</span> : <span class="stringliteral">""</span>);</div> |
|||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a>.find(<span class="stringliteral">"\r\n\r\n"</span>) != string::npos)</div> |
|||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">return</span> !this-><a class="code hl_function" href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7">parseHeader</a>(env) ? false : (<a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> != 0 ? <a class="code hl_function" href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">getBody</a>(paquet) : <span class="keyword">true</span>);</div> |
|||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>}</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda"> 58</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">Client::getBody</a>(<span class="keywordtype">string</span> paquet) {</div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> lines = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(paquet, <span class="stringliteral">"\r\n"</span>);</div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> vec_string::iterator it;</div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">for</span> (it = lines.begin(); it < lines.end(); it++) {</div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> cout << <span class="stringliteral">"Remaining length: "</span> << <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">if</span> ((*it).length() && <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> <= 0 && <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Transfer-Encoding:"</span>, 0) == <span class="stringliteral">"chunked"</span>) {</div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> = std::strtol((*it).c_str(), 0, 16) + 2;</div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <a class="code hl_variable" href="classClient.html#ad76783880af38b42a854937101819ad2">_last_chunk</a> = <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> == 2 ? true : <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> > 0 || it != lines.begin()) {</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a> += *it + <span class="stringliteral">"\r\n"</span>;</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> -= ((*it).length() + 2);</div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div> |
|||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div> |
|||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// if (_body.size())</span></div> |
|||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a>.resize(<a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a>.length() - 2);</div> |
|||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> += 2;</div> |
|||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">return</span> (<a class="code hl_variable" href="classClient.html#ad76783880af38b42a854937101819ad2">_last_chunk</a> && <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> == 0) ? true : <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>}</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7"> 79</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7">Client::parseHeader</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env) {</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> lines, method, line;</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> cout << <span class="stringliteral">"Parsing header...\n"</span>;</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> lines = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(<a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a>, <span class="stringliteral">"\r\n"</span>);</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> method = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(lines.at(0), <span class="stringliteral">" "</span>);</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>[<span class="stringliteral">"Method:"</span>] = method;</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">if</span> (lines.size() > 0) {</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">for</span> (vec_string::iterator it = lines.begin() + 1; it < lines.end(); it++) {</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> line = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(*it, <span class="stringliteral">" "</span>);</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>[line.at(0)] = <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a>(line.begin() + 1, line.end());</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> = <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Method:"</span>, 0);</div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">if</span> ((<a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"POST"</span> || <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"PUT"</span>) && <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Content-Length:"</span>, 0) == <span class="stringliteral">""</span> &&</div> |
|||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Transfer-Encoding:"</span>, 0) != <span class="stringliteral">"chunked"</span>)</div> |
|||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">return</span> (<a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(400), <span class="keyword">false</span>);</div> |
|||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> uri_split = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(<a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Method:"</span>, 1), <span class="stringliteral">"?"</span>);</div> |
|||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a> = uri_split.at(0);</div> |
|||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">if</span> (uri_split.size() > 1)</div> |
|||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_variable" href="classClient.html#a7ac7f7134aa234289d43e9e1404226fd">_query</a> = uri_split.at(1);</div> |
|||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_variable" href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">_host</a> = <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Host:"</span>, 0);</div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_variable" href="classClient.html#a429e302dd255c112725f432f0ca9a1de">_env</a> = env;</div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a> = <a class="code hl_variable" href="classClient.html#a62889754be24e772908ce370f2ba0199">_parent</a>-><a class="code hl_function" href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">choose_server</a>(env, <a class="code hl_variable" href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">_host</a>);</div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a> = <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_function" href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9">choose_route</a>(<a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a>);</div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="classClient.html#a1a58e00763626d48ee8625ad16a95d08">debug_header</a>();</div> |
|||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">string</span> len = <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="stringliteral">"Content-Length:"</span>, 0).c_str();</div> |
|||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">if</span> (len != <span class="stringliteral">""</span>) {</div> |
|||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> = std::atoi(len.c_str());</div> |
|||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <a class="code hl_variable" href="classClient.html#ad76783880af38b42a854937101819ad2">_last_chunk</a> = <span class="keyword">true</span>;</div> |
|||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">int</span> max_len = <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a> > 0 ? <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a></div> |
|||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> : <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a> > 0 ? <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a></div> |
|||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> : INT_MAX;</div> |
|||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> > max_len)</div> |
|||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">return</span> (<a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(413), <span class="keyword">false</span>);</div> |
|||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> } <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a> = 0;</div> |
|||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> |
|||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div> |
|||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div> |
|||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"><a class="line" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa"> 121</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">Client::header_pick</a>(<span class="keywordtype">string</span> key, <span class="keywordtype">size_t</span> <span class="keywordtype">id</span>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>[key].size() <= <span class="keywordtype">id</span> ? <span class="stringliteral">""</span> : <a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>[key].at(<span class="keywordtype">id</span>); }</div> |
|||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div> |
|||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b"> 123</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b">Client::check_method</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> allowed;</div> |
|||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">if</span> ((<a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a> && (allowed = <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_variable" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">_allowed_methods</a>).size() > 0) ||</div> |
|||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> (<a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a> && (allowed = <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_variable" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">_allowed_methods</a>).size() > 0) || ((allowed = <a class="code hl_variable" href="classClient.html#a429e302dd255c112725f432f0ca9a1de">_env</a>-><a class="code hl_variable" href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">_allowed_methods</a>).size() > 0))</div> |
|||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> std::find(allowed.begin(), allowed.end(), <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a>) < allowed.end() ? true : <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"GET"</span> || <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"POST"</span> || <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"DELETE"</span> || <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"PUT"</span>)</div> |
|||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div> |
|||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div> |
|||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}</div> |
|||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div> |
|||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb"> 133</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb">Client::handleRequest</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>) {</div> |
|||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_function" href="debug_8cpp.html#afb2639655e07c91426064b6bdfff7079">debug_block</a>(<span class="stringliteral">"Header: "</span>, <a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a>);</div> |
|||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <a class="code hl_function" href="debug_8cpp.html#afb2639655e07c91426064b6bdfff7079">debug_block</a>(<span class="stringliteral">"Body: "</span>, <a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a>);</div> |
|||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div> |
|||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordtype">string</span> ret;</div> |
|||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordtype">string</span> req_path = <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_function" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">getRoot</a>() + <a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a>;</div> |
|||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> std::cout << <span class="stringliteral">"||-> Request for "</span> << req_path << <span class="stringliteral">" received <-||\n"</span>;</div> |
|||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordtype">string</span> cgi_path = <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>.size() ? <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>[<a class="code hl_function" href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23">get_extension</a>(req_path)]</div> |
|||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> : <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>.size() ? <a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>-><a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>[<a class="code hl_function" href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23">get_extension</a>(req_path)]</div> |
|||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> : <span class="stringliteral">""</span>;</div> |
|||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> cout << <span class="stringliteral">"Path: "</span> << req_path << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b">check_method</a>())</div> |
|||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(405);</div> |
|||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">else</span> {</div> |
|||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">if</span> ((ret = <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_function" href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">getIndex</a>(<a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a>, req_path)) == <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> ret = <a class="code hl_function" href="tools_8cpp.html#a044b9a41ee6f56019e039d36e91dc265">read_file</a>(req_path);</div> |
|||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">if</span> (ret == <span class="stringliteral">"404"</span>) {</div> |
|||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"POST"</span> || <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"PUT"</span>)</div> |
|||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="classClient.html#a034a4f9166be42ffb3844b402a4f1881">create_file</a>(req_path);</div> |
|||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(404);</div> |
|||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ret == <span class="stringliteral">"403"</span>)</div> |
|||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(403);</div> |
|||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a> == <span class="stringliteral">"DELETE"</span>)</div> |
|||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::remove(req_path.c_str());</div> |
|||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (cgi_path != <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_function" href="classClient.html#a9f221331479aa9502ee2c372164095fc">cgi</a>(cgi_path, req_path);</div> |
|||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 200 OK\r\n"</span> + ret);</div> |
|||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div> |
|||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span>}</div> |
|||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div> |
|||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="classClient.html#a034a4f9166be42ffb3844b402a4f1881"> 167</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a034a4f9166be42ffb3844b402a4f1881">Client::create_file</a>(<span class="keywordtype">string</span> path) {</div> |
|||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> std::ofstream file(path.c_str());</div> |
|||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">if</span> (!file.good())</div> |
|||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(403);</div> |
|||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">else</span> {</div> |
|||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> file << <a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a>;</div> |
|||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> file.close();</div> |
|||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 201 Accepted\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> }</div> |
|||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span>}</div> |
|||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div> |
|||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="classClient.html#a9f221331479aa9502ee2c372164095fc"> 178</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a9f221331479aa9502ee2c372164095fc">Client::cgi</a>(<span class="keywordtype">string</span> cgi_path, <span class="keywordtype">string</span> path) {</div> |
|||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordtype">int</span> status;</div> |
|||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordtype">int</span> fd[2];</div> |
|||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> std::stringstream ss;</div> |
|||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordtype">string</span> ret;</div> |
|||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div> |
|||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">if</span> (!std::ifstream(cgi_path.c_str()).good())</div> |
|||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(404);</div> |
|||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> pipe(fd);</div> |
|||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">if</span> (fork() == 0) {</div> |
|||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keyword">const</span> <span class="keywordtype">char</span> **args = <span class="keyword">new</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *[cgi_path.length() + path.length() + 2];</div> |
|||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> args[0] = cgi_path.c_str();</div> |
|||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> args[1] = path.c_str();</div> |
|||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> args[2] = NULL;</div> |
|||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordtype">string</span> path_info = <span class="stringliteral">"PATH_INFO="</span> + <a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>-><a class="code hl_function" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">getRoot</a>();</div> |
|||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordtype">string</span> query = <span class="stringliteral">"QUERY_STRING="</span> + <a class="code hl_variable" href="classClient.html#a7ac7f7134aa234289d43e9e1404226fd">_query</a>;</div> |
|||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keyword">const</span> <span class="keywordtype">char</span> **env = <span class="keyword">new</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *[path_info.length() + query.length() + 2];</div> |
|||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> env[0] = path_info.c_str();</div> |
|||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> env[1] = query.c_str();</div> |
|||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> env[2] = NULL;</div> |
|||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> dup2(fd[1], STDOUT_FILENO);</div> |
|||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> close(fd[1]);</div> |
|||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> close(fd[0]);</div> |
|||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> execve(cgi_path.c_str(), (<span class="keywordtype">char</span> **)args, (<span class="keywordtype">char</span> **)env);</div> |
|||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> }</div> |
|||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> close(fd[1]);</div> |
|||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> waitpid(-1, &status, 0);</div> |
|||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="keywordtype">char</span> buffer[10000];</div> |
|||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> buffer[read(fd[0], buffer, 10000)] = 0;</div> |
|||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> ret = string(buffer);</div> |
|||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> ss << <span class="stringliteral">"HTTP/1.1 200 OK\r\nContent-Length: "</span> << ret.length() - ret.find(<span class="stringliteral">"\r\n\r\n"</span>) - 4 << <span class="stringliteral">"\r\n\r\n"</span> << ret;</div> |
|||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(ss.str());</div> |
|||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span>}</div> |
|||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div> |
|||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="classClient.html#a0c6bb0009c8415f9e49130cd7b6ecc8c"> 212</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a0c6bb0009c8415f9e49130cd7b6ecc8c">Client::send_redir</a>(<span class="keywordtype">int</span> redir_code, <span class="keywordtype">string</span> opt) {</div> |
|||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keywordflow">switch</span> (redir_code) {</div> |
|||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keywordflow">case</span> 301:</div> |
|||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTTP/1.1 301 Moved Permanently\r\nLocation: "</span> + opt + <span class="stringliteral">"\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> }</div> |
|||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span>}</div> |
|||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div> |
|||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"><a class="line" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7"> 219</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">Client::send_error</a>(<span class="keywordtype">int</span> error_code) {</div> |
|||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <span class="keywordflow">switch</span> (error_code) {</div> |
|||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordflow">case</span> 400:</div> |
|||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 400 Bad Request\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keywordflow">case</span> 403:</div> |
|||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">case</span> 404:</div> |
|||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keywordflow">case</span> 405:</div> |
|||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 405 Method Not Allowed\r\nConnection: "</span></div> |
|||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="stringliteral">"close\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keywordflow">case</span> 413:</div> |
|||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="stringliteral">"HTTP/1.1 413 Payload Too "</span></div> |
|||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="stringliteral">"Large\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"</span>);</div> |
|||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> }</div> |
|||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span>}</div> |
|||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> </div> |
|||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540"> 236</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">Client::send_answer</a>(<span class="keywordtype">string</span> msg) {</div> |
|||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <a class="code hl_function" href="debug_8cpp.html#afb2639655e07c91426064b6bdfff7079">debug_block</a>(<span class="stringliteral">"ANSWER: "</span>, msg);</div> |
|||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span><span class="preprocessor">#ifdef __linux__</span></div> |
|||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> send(this-><a class="code hl_variable" href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">_fd</a>, msg.c_str(), msg.length(), MSG_NOSIGNAL | MSG_DONTWAIT);</div> |
|||
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span><span class="preprocessor">#elif __APPLE__</span></div> |
|||
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> send(this-><a class="code hl_variable" href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">_fd</a>, msg.c_str(), msg.length(), 0);</div> |
|||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span><span class="preprocessor">#endif</span></div> |
|||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <a class="code hl_function" href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">init</a>();</div> |
|||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span>}</div> |
|||
<div class="ttc" id="aClient_8cpp_html_a11a04898e654ff6d1884f543f3051d23"><div class="ttname"><a href="Client_8cpp.html#a11a04898e654ff6d1884f543f3051d23">get_extension</a></div><div class="ttdeci">string get_extension(string str)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00010">Client.cpp:10</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a034a4f9166be42ffb3844b402a4f1881"><div class="ttname"><a href="classClient.html#a034a4f9166be42ffb3844b402a4f1881">Client::create_file</a></div><div class="ttdeci">void create_file(string path)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00167">Client.cpp:167</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a084660f5c518a2fbd2e68411c0ef5ae8"><div class="ttname"><a href="classClient.html#a084660f5c518a2fbd2e68411c0ef5ae8">Client::Client</a></div><div class="ttdeci">Client(int fd, ip_port_t ip_port, Master *parent)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00018">Client.cpp:18</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a0c6bb0009c8415f9e49130cd7b6ecc8c"><div class="ttname"><a href="classClient.html#a0c6bb0009c8415f9e49130cd7b6ecc8c">Client::send_redir</a></div><div class="ttdeci">void send_redir(int redir_code, string opt)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00212">Client.cpp:212</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a1a58e00763626d48ee8625ad16a95d08"><div class="ttname"><a href="classClient.html#a1a58e00763626d48ee8625ad16a95d08">Client::debug_header</a></div><div class="ttdeci">void debug_header(void)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8cpp_source.html#l00011">debug.cpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a1c3b8a2f750c8578d3bef07f2d9fe8f5"><div class="ttname"><a href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">Client::_body</a></div><div class="ttdeci">string _body</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a2ceac8ae6b5be095334bcfa495da4f4b"><div class="ttname"><a href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">Client::_host</a></div><div class="ttdeci">string _host</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a3c5fe029aa5e2293d7c31e79dda7a937"><div class="ttname"><a href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">Client::_len</a></div><div class="ttdeci">int _len</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00012">Client.hpp:12</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a3e6860ba08a116dcc3e75d97d91297c7"><div class="ttname"><a href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7">Client::parseHeader</a></div><div class="ttdeci">bool parseHeader(Env *env)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00079">Client.cpp:79</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a429e302dd255c112725f432f0ca9a1de"><div class="ttname"><a href="classClient.html#a429e302dd255c112725f432f0ca9a1de">Client::_env</a></div><div class="ttdeci">Env * _env</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00009">Client.hpp:9</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a44bd2f49f7a1d456c8ae9c4b22302540"><div class="ttname"><a href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">Client::send_answer</a></div><div class="ttdeci">void send_answer(string msg)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00236">Client.cpp:236</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a49268fda2ecee38b54f85581329b3920"><div class="ttname"><a href="classClient.html#a49268fda2ecee38b54f85581329b3920">Client::_server</a></div><div class="ttdeci">Server * _server</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00008">Client.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a502dd093f921afb109cddebf88e135b7"><div class="ttname"><a href="classClient.html#a502dd093f921afb109cddebf88e135b7">Client::_request</a></div><div class="ttdeci">std::map< string, vec_string > _request</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00014">Client.hpp:14</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a5f6dcf73d3321725f64145bc065e1d1f"><div class="ttname"><a href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">Client::init</a></div><div class="ttdeci">void init(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00028">Client.cpp:28</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a6033d622cb33f0ea41313e859b621606"><div class="ttname"><a href="classClient.html#a6033d622cb33f0ea41313e859b621606">Client::_method</a></div><div class="ttdeci">string _method</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a612d8a71243e1fa5b29ec952a6804b66"><div class="ttname"><a href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">Client::_route</a></div><div class="ttdeci">Route * _route</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00010">Client.hpp:10</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a62889754be24e772908ce370f2ba0199"><div class="ttname"><a href="classClient.html#a62889754be24e772908ce370f2ba0199">Client::_parent</a></div><div class="ttdeci">Master * _parent</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00007">Client.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a66e3074e5f09c5e9bb4ec36bdea01c91"><div class="ttname"><a href="classClient.html#a66e3074e5f09c5e9bb4ec36bdea01c91">Client::~Client</a></div><div class="ttdeci">~Client(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00023">Client.cpp:23</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a674ad248447cc8ff80b4326d4fadfa6b"><div class="ttname"><a href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b">Client::check_method</a></div><div class="ttdeci">bool check_method(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00123">Client.cpp:123</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a76a7d1bb0a940f1b180ac251b47e6cf4"><div class="ttname"><a href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">Client::_fd</a></div><div class="ttdeci">int _fd</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00005">Client.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7ac7f7134aa234289d43e9e1404226fd"><div class="ttname"><a href="classClient.html#a7ac7f7134aa234289d43e9e1404226fd">Client::_query</a></div><div class="ttdeci">string _query</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7af52bcb17cc9d34c2207d0e540f6ac1"><div class="ttname"><a href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">Client::_uri</a></div><div class="ttdeci">string _uri</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7f318232807a0d483841ce22e1910bc7"><div class="ttname"><a href="classClient.html#a7f318232807a0d483841ce22e1910bc7">Client::_ip_port</a></div><div class="ttdeci">ip_port_t _ip_port</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00006">Client.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a8d671d9129091ed238c9833f4d3b5dda"><div class="ttname"><a href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">Client::getBody</a></div><div class="ttdeci">bool getBody(string paquet)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00058">Client.cpp:58</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a9f221331479aa9502ee2c372164095fc"><div class="ttname"><a href="classClient.html#a9f221331479aa9502ee2c372164095fc">Client::cgi</a></div><div class="ttdeci">void cgi(string cgi_path, string path)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00178">Client.cpp:178</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_aa3fd6ca9ee860544e53a84cae96c19cb"><div class="ttname"><a href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb">Client::handleRequest</a></div><div class="ttdeci">void handleRequest(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00133">Client.cpp:133</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_aab596e9a3653c01abb942bc6ee3001fa"><div class="ttname"><a href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">Client::header_pick</a></div><div class="ttdeci">string header_pick(string key, size_t id)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00121">Client.cpp:121</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_abbbc980dcbfaf7db2cf1d50cac87cef6"><div class="ttname"><a href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">Client::_header</a></div><div class="ttdeci">string _header</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_ac5ee168964331e90a3afcf8531f3cca7"><div class="ttname"><a href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">Client::send_error</a></div><div class="ttdeci">void send_error(int error_code)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00219">Client.cpp:219</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_acbcc94de0dd77b5635b574c9f23acdb8"><div class="ttname"><a href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8">Client::getRequest</a></div><div class="ttdeci">bool getRequest(Env *env, string paquet)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00037">Client.cpp:37</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_ad76783880af38b42a854937101819ad2"><div class="ttname"><a href="classClient.html#ad76783880af38b42a854937101819ad2">Client::_last_chunk</a></div><div class="ttdeci">bool _last_chunk</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00013">Client.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html"><div class="ttname"><a href="classEnv.html">Env</a></div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00004">Env.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_af554adf3353c753d3e3050fc04bd297f"><div class="ttname"><a href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">Env::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00008">Env.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html"><div class="ttname"><a href="classMaster.html">Master</a></div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00004">Master.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a5486cb0d32ba29cd31b212c3457942b1"><div class="ttname"><a href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">Master::choose_server</a></div><div class="ttdeci">Server * choose_server(Env *env, string host)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00113">Master.cpp:113</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a1688ba652b72bb3a1a0055e7e9cd3e41"><div class="ttname"><a href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">Route::_cgi</a></div><div class="ttdeci">std::map< string, string > _cgi</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00012">Route.hpp:12</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a3096f41064cf24c0c884d4c26f2fa07f"><div class="ttname"><a href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">Route::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00011">Route.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a554deee37019d76b96a3411301b1d380"><div class="ttname"><a href="classRoute.html#a554deee37019d76b96a3411301b1d380">Route::_client_max_body_size</a></div><div class="ttdeci">int _client_max_body_size</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00013">Route.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_aa71b39273ba7bc2f683f40a6573ff810"><div class="ttname"><a href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">Route::getIndex</a></div><div class="ttdeci">string getIndex(string uri, string path)</div><div class="ttdoc">Search for an index while generating autoindex.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00066">Route.cpp:66</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_afd1fe00a85e85ac4964f618f8f2d7bdf"><div class="ttname"><a href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">Route::getRoot</a></div><div class="ttdeci">string getRoot(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00055">Route.cpp:55</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a0664c62a66a7e3e41d48c286c55a90a9"><div class="ttname"><a href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9">Server::choose_route</a></div><div class="ttdeci">Route * choose_route(string uri)</div><div class="ttdoc">Choose the route an uri asked to the server.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00102">Server.cpp:102</a></div></div> |
|||
<div class="ttc" id="adebug_8cpp_html_afb2639655e07c91426064b6bdfff7079"><div class="ttname"><a href="debug_8cpp.html#afb2639655e07c91426064b6bdfff7079">debug_block</a></div><div class="ttdeci">void debug_block(string name, string content)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8cpp_source.html#l00003">debug.cpp:3</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html"><div class="ttname"><a href="structip__port__s.html">ip_port_s</a></div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00035">webserv.hpp:35</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html_aae56f9ac0aa0193aaae11be127aa578e"><div class="ttname"><a href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">ip_port_s::port</a></div><div class="ttdeci">int port</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00038">webserv.hpp:38</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html_afb20776a9723a50ac32fd9b8248b3e0c"><div class="ttname"><a href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip_port_s::ip</a></div><div class="ttdeci">string ip</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00037">webserv.hpp:37</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a044b9a41ee6f56019e039d36e91dc265"><div class="ttname"><a href="tools_8cpp.html#a044b9a41ee6f56019e039d36e91dc265">read_file</a></div><div class="ttdeci">string read_file(string path)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00058">tools.cpp:58</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a4a79e98b5dec14d16875307f7e77dfb3"><div class="ttname"><a href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a></div><div class="ttdeci">vec_string split(string str, string delim)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00020">tools.cpp:20</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_ad72dbcf6d0153db1b8d8a58001feed83"><div class="ttname"><a href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a></div><div class="ttdeci">#define DEBUG</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00002">webserv.hpp:2</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Client.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Client.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Client.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Client_8hpp__incl.png" border="0" usemap="#aincludes_2Client_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Client_8hpp" id="aincludes_2Client_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2485,152,2580,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2605,152,2695,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2720,152,2807,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2831,152,2920,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="2945,152,3033,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3057,152,3147,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3172,152,3245,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Client_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Client_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Client_8hppdep" id="aincludes_2Client_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="5,152,136,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="160,152,312,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="336,152,485,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="509,152,656,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Client_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classClient.html">Client</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Client_8hpp = |
|||
[ |
|||
[ "Client", "classClient.html", "classClient" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Client.hpp" name="includes/Client.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" id="node3" href="$Env_8hpp.html" title=" " alt="" coords="5,152,136,177"/> |
|||
<area shape="rect" id="node4" href="$Master_8hpp.html" title=" " alt="" coords="160,152,312,177"/> |
|||
<area shape="rect" id="node5" href="$Nodes_8hpp.html" title=" " alt="" coords="336,152,485,177"/> |
|||
<area shape="rect" id="node6" href="$Parser_8hpp.html" title=" " alt="" coords="509,152,656,177"/> |
|||
<area shape="rect" id="node7" href="$Route_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
4f0515af327894f80db6bfd8a1eb31fe |
After Width: | Height: | Size: 69 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Client.hpp" name="includes/Client.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Master_8hpp.html" title=" " alt="" coords="2485,152,2580,177"/> |
|||
<area shape="rect" id="node29" href="$Nodes_8hpp.html" title=" " alt="" coords="2605,152,2695,177"/> |
|||
<area shape="rect" id="node30" href="$Token_8hpp.html" title=" " alt="" coords="2720,152,2807,177"/> |
|||
<area shape="rect" id="node31" href="$Parser_8hpp.html" title=" " alt="" coords="2831,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Route_8hpp.html" title=" " alt="" coords="2945,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Server_8hpp.html" title=" " alt="" coords="3057,152,3147,177"/> |
|||
<area shape="rect" id="node34" href="$Env_8hpp.html" title=" " alt="" coords="3172,152,3245,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
88950902665e08c1dfc0faba6bf44210 |
After Width: | Height: | Size: 104 KiB |
@ -0,0 +1,159 @@ |
|||
<!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: includes/Client.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Client.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Client_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classClient.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classClient.html">Client</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"><a class="line" href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4"> 5</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">_fd</a>;</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classClient.html#a7f318232807a0d483841ce22e1910bc7"> 6</a></span> <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> <a class="code hl_variable" href="classClient.html#a7f318232807a0d483841ce22e1910bc7">_ip_port</a>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"><a class="line" href="classClient.html#a62889754be24e772908ce370f2ba0199"> 7</a></span> <a class="code hl_class" href="classMaster.html">Master</a> *<a class="code hl_variable" href="classClient.html#a62889754be24e772908ce370f2ba0199">_parent</a>;</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="classClient.html#a49268fda2ecee38b54f85581329b3920"> 8</a></span> <a class="code hl_class" href="classServer.html">Server</a> *<a class="code hl_variable" href="classClient.html#a49268fda2ecee38b54f85581329b3920">_server</a>;</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"><a class="line" href="classClient.html#a429e302dd255c112725f432f0ca9a1de"> 9</a></span> <a class="code hl_class" href="classEnv.html">Env</a> *<a class="code hl_variable" href="classClient.html#a429e302dd255c112725f432f0ca9a1de">_env</a>;</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66"> 10</a></span> <a class="code hl_class" href="classRoute.html">Route</a> *<a class="code hl_variable" href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">_route</a>;</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5"> 11</a></span> <span class="keywordtype">string</span> <a class="code hl_variable" href="classClient.html#a6033d622cb33f0ea41313e859b621606">_method</a>, <a class="code hl_variable" href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">_uri</a>, <a class="code hl_variable" href="classClient.html#a7ac7f7134aa234289d43e9e1404226fd">_query</a>, <a class="code hl_variable" href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">_host</a>, <a class="code hl_variable" href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">_header</a>, <a class="code hl_variable" href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">_body</a>;</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937"> 12</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">_len</a>;</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classClient.html#ad76783880af38b42a854937101819ad2"> 13</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classClient.html#ad76783880af38b42a854937101819ad2">_last_chunk</a>;</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="classClient.html#a502dd093f921afb109cddebf88e135b7"> 14</a></span> std::map<string, vec_string> <a class="code hl_variable" href="classClient.html#a502dd093f921afb109cddebf88e135b7">_request</a>;</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">init</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">getBody</a>(<span class="keywordtype">string</span> paquet);</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7">parseHeader</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env);</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">header_pick</a>(<span class="keywordtype">string</span> key, <span class="keywordtype">size_t</span> <span class="keywordtype">id</span>);</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b">check_method</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a034a4f9166be42ffb3844b402a4f1881">create_file</a>(<span class="keywordtype">string</span> path);</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a9f221331479aa9502ee2c372164095fc">cgi</a>(<span class="keywordtype">string</span> cgi_path, <span class="keywordtype">string</span> path);</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a0c6bb0009c8415f9e49130cd7b6ecc8c">send_redir</a>(<span class="keywordtype">int</span> redir_code, <span class="keywordtype">string</span> opt);</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">send_error</a>(<span class="keywordtype">int</span> error_code);</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">send_answer</a>(<span class="keywordtype">string</span> msg);</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#ifdef DEBUG</span></div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#a1a58e00763626d48ee8625ad16a95d08">debug_header</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#endif</span></div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <a class="code hl_class" href="classClient.html">Client</a>(<span class="keywordtype">int</span> fd, <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> ip_port, <a class="code hl_class" href="classMaster.html">Master</a> *parent);</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_function" href="classClient.html#a66e3074e5f09c5e9bb4ec36bdea01c91">~Client</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8">getRequest</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env, <span class="keywordtype">string</span> paquet);</div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb">handleRequest</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classClient.html#a34b85c36cc2386b553fcff72fc15a596"> 37</a></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classMaster.html">Master</a>;</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>};</div> |
|||
<div class="ttc" id="aclassClient_html"><div class="ttname"><a href="classClient.html">Client</a></div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00004">Client.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a034a4f9166be42ffb3844b402a4f1881"><div class="ttname"><a href="classClient.html#a034a4f9166be42ffb3844b402a4f1881">Client::create_file</a></div><div class="ttdeci">void create_file(string path)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00167">Client.cpp:167</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a0c6bb0009c8415f9e49130cd7b6ecc8c"><div class="ttname"><a href="classClient.html#a0c6bb0009c8415f9e49130cd7b6ecc8c">Client::send_redir</a></div><div class="ttdeci">void send_redir(int redir_code, string opt)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00212">Client.cpp:212</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a1a58e00763626d48ee8625ad16a95d08"><div class="ttname"><a href="classClient.html#a1a58e00763626d48ee8625ad16a95d08">Client::debug_header</a></div><div class="ttdeci">void debug_header(void)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8cpp_source.html#l00011">debug.cpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a1c3b8a2f750c8578d3bef07f2d9fe8f5"><div class="ttname"><a href="classClient.html#a1c3b8a2f750c8578d3bef07f2d9fe8f5">Client::_body</a></div><div class="ttdeci">string _body</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a2ceac8ae6b5be095334bcfa495da4f4b"><div class="ttname"><a href="classClient.html#a2ceac8ae6b5be095334bcfa495da4f4b">Client::_host</a></div><div class="ttdeci">string _host</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a3c5fe029aa5e2293d7c31e79dda7a937"><div class="ttname"><a href="classClient.html#a3c5fe029aa5e2293d7c31e79dda7a937">Client::_len</a></div><div class="ttdeci">int _len</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00012">Client.hpp:12</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a3e6860ba08a116dcc3e75d97d91297c7"><div class="ttname"><a href="classClient.html#a3e6860ba08a116dcc3e75d97d91297c7">Client::parseHeader</a></div><div class="ttdeci">bool parseHeader(Env *env)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00079">Client.cpp:79</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a429e302dd255c112725f432f0ca9a1de"><div class="ttname"><a href="classClient.html#a429e302dd255c112725f432f0ca9a1de">Client::_env</a></div><div class="ttdeci">Env * _env</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00009">Client.hpp:9</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a44bd2f49f7a1d456c8ae9c4b22302540"><div class="ttname"><a href="classClient.html#a44bd2f49f7a1d456c8ae9c4b22302540">Client::send_answer</a></div><div class="ttdeci">void send_answer(string msg)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00236">Client.cpp:236</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a49268fda2ecee38b54f85581329b3920"><div class="ttname"><a href="classClient.html#a49268fda2ecee38b54f85581329b3920">Client::_server</a></div><div class="ttdeci">Server * _server</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00008">Client.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a502dd093f921afb109cddebf88e135b7"><div class="ttname"><a href="classClient.html#a502dd093f921afb109cddebf88e135b7">Client::_request</a></div><div class="ttdeci">std::map< string, vec_string > _request</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00014">Client.hpp:14</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a5f6dcf73d3321725f64145bc065e1d1f"><div class="ttname"><a href="classClient.html#a5f6dcf73d3321725f64145bc065e1d1f">Client::init</a></div><div class="ttdeci">void init(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00028">Client.cpp:28</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a6033d622cb33f0ea41313e859b621606"><div class="ttname"><a href="classClient.html#a6033d622cb33f0ea41313e859b621606">Client::_method</a></div><div class="ttdeci">string _method</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a612d8a71243e1fa5b29ec952a6804b66"><div class="ttname"><a href="classClient.html#a612d8a71243e1fa5b29ec952a6804b66">Client::_route</a></div><div class="ttdeci">Route * _route</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00010">Client.hpp:10</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a62889754be24e772908ce370f2ba0199"><div class="ttname"><a href="classClient.html#a62889754be24e772908ce370f2ba0199">Client::_parent</a></div><div class="ttdeci">Master * _parent</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00007">Client.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a66e3074e5f09c5e9bb4ec36bdea01c91"><div class="ttname"><a href="classClient.html#a66e3074e5f09c5e9bb4ec36bdea01c91">Client::~Client</a></div><div class="ttdeci">~Client(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00023">Client.cpp:23</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a674ad248447cc8ff80b4326d4fadfa6b"><div class="ttname"><a href="classClient.html#a674ad248447cc8ff80b4326d4fadfa6b">Client::check_method</a></div><div class="ttdeci">bool check_method(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00123">Client.cpp:123</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a76a7d1bb0a940f1b180ac251b47e6cf4"><div class="ttname"><a href="classClient.html#a76a7d1bb0a940f1b180ac251b47e6cf4">Client::_fd</a></div><div class="ttdeci">int _fd</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00005">Client.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7ac7f7134aa234289d43e9e1404226fd"><div class="ttname"><a href="classClient.html#a7ac7f7134aa234289d43e9e1404226fd">Client::_query</a></div><div class="ttdeci">string _query</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7af52bcb17cc9d34c2207d0e540f6ac1"><div class="ttname"><a href="classClient.html#a7af52bcb17cc9d34c2207d0e540f6ac1">Client::_uri</a></div><div class="ttdeci">string _uri</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a7f318232807a0d483841ce22e1910bc7"><div class="ttname"><a href="classClient.html#a7f318232807a0d483841ce22e1910bc7">Client::_ip_port</a></div><div class="ttdeci">ip_port_t _ip_port</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00006">Client.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a8d671d9129091ed238c9833f4d3b5dda"><div class="ttname"><a href="classClient.html#a8d671d9129091ed238c9833f4d3b5dda">Client::getBody</a></div><div class="ttdeci">bool getBody(string paquet)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00058">Client.cpp:58</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_a9f221331479aa9502ee2c372164095fc"><div class="ttname"><a href="classClient.html#a9f221331479aa9502ee2c372164095fc">Client::cgi</a></div><div class="ttdeci">void cgi(string cgi_path, string path)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00178">Client.cpp:178</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_aa3fd6ca9ee860544e53a84cae96c19cb"><div class="ttname"><a href="classClient.html#aa3fd6ca9ee860544e53a84cae96c19cb">Client::handleRequest</a></div><div class="ttdeci">void handleRequest(void)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00133">Client.cpp:133</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_aab596e9a3653c01abb942bc6ee3001fa"><div class="ttname"><a href="classClient.html#aab596e9a3653c01abb942bc6ee3001fa">Client::header_pick</a></div><div class="ttdeci">string header_pick(string key, size_t id)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00121">Client.cpp:121</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_abbbc980dcbfaf7db2cf1d50cac87cef6"><div class="ttname"><a href="classClient.html#abbbc980dcbfaf7db2cf1d50cac87cef6">Client::_header</a></div><div class="ttdeci">string _header</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00011">Client.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_ac5ee168964331e90a3afcf8531f3cca7"><div class="ttname"><a href="classClient.html#ac5ee168964331e90a3afcf8531f3cca7">Client::send_error</a></div><div class="ttdeci">void send_error(int error_code)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00219">Client.cpp:219</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_acbcc94de0dd77b5635b574c9f23acdb8"><div class="ttname"><a href="classClient.html#acbcc94de0dd77b5635b574c9f23acdb8">Client::getRequest</a></div><div class="ttdeci">bool getRequest(Env *env, string paquet)</div><div class="ttdef"><b>Definition:</b> <a href="Client_8cpp_source.html#l00037">Client.cpp:37</a></div></div> |
|||
<div class="ttc" id="aclassClient_html_ad76783880af38b42a854937101819ad2"><div class="ttname"><a href="classClient.html#ad76783880af38b42a854937101819ad2">Client::_last_chunk</a></div><div class="ttdeci">bool _last_chunk</div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00013">Client.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html"><div class="ttname"><a href="classEnv.html">Env</a></div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00004">Env.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html"><div class="ttname"><a href="classMaster.html">Master</a></div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00004">Master.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html"><div class="ttname"><a href="classRoute.html">Route</a></div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00004">Route.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html"><div class="ttname"><a href="structip__port__s.html">ip_port_s</a></div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00035">webserv.hpp:35</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,130 @@ |
|||
<!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: srcs/load/Env.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Env.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Env.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Env_8cpp__incl.png" border="0" usemap="#asrcs_2load_2Env_8cpp" alt=""/></div> |
|||
<map name="asrcs_2load_2Env_8cpp" id="asrcs_2load_2Env_8cpp"> |
|||
<area shape="rect" title=" " alt="" coords="2015,5,2149,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Env_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/load/Env.cpp" name="srcs/load/Env.cpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="2015,5,2149,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
e1dafd16931a8607501a76ff30af0eee |
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,172 @@ |
|||
<!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: srcs/load/Env.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Env.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Env_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">/*|==========|</span></div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> * Environment constructor:</span></div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> *</span></div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * Input: The JSONParser output</span></div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> * Output: The env object containing servers and sockets vectors defined inside</span></div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * conf file by servers blocks and listens.</span></div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> */</span></div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="classEnv.html#ace0ebeb150673fa69526c14d8417d587"> 10</a></span><a class="code hl_function" href="classEnv.html#ace0ebeb150673fa69526c14d8417d587">Env::Env</a>(<a class="code hl_class" href="classJSONNode.html">JSONNode</a> *conf) {</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keywordflow">try</span> {</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node;</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> lst;</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">if</span> ((node = conf-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>()[<span class="stringliteral">"servers"</span>])) {</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> lst = conf-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>()[<span class="stringliteral">"servers"</span>]->lst();</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordflow">for</span> (std::vector<JSONNode *>::iterator it = lst.begin(); it < lst.end(); it++) {</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <a class="code hl_class" href="classServer.html">Server</a> *server = <span class="keyword">new</span> <a class="code hl_class" href="classServer.html">Server</a>(*it);</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> this-><a class="code hl_variable" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">_servers</a>.push_back(server);</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> std::vector<Master *> tmp_s = server-><a class="code hl_function" href="classServer.html#a5738134631f6bab9a26ca0687d86f21f">get_sockets</a>(*it);</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.insert(this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.end(), tmp_s.begin(), tmp_s.end());</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> }</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> }</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">if</span> ((node = conf-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>()[<span class="stringliteral">"allowed_methods"</span>])) {</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> lst = node-><a class="code hl_function" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">lst</a>();</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">for</span> (JSONList::iterator it = lst.begin(); it < lst.end(); it++) {</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> this-><a class="code hl_variable" href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">_allowed_methods</a>.push_back((*it)->str());</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> }</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> }</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> } <span class="keywordflow">catch</span> (std::exception &e) {</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> std::cerr << e.what() << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> }</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">delete</span> conf;</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>}</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classEnv.html#aae7e70f6b1aa0ddc3e9b2766d1cbfb5e"> 40</a></span><a class="code hl_function" href="classEnv.html#aae7e70f6b1aa0ddc3e9b2766d1cbfb5e">Env::~Env</a>() {</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">for</span> (std::vector<Server *>::iterator it = this-><a class="code hl_variable" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">_servers</a>.begin(); it < this-><a class="code hl_variable" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">_servers</a>.end(); it++) {</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">delete</span> *it;</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">for</span> (std::vector<Master *>::iterator it = this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.begin(); it < this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.end(); it++) {</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">delete</span> *it;</div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> }</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>}</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classEnv.html#a0c8b92f45308987231f9b0be8751d39f"> 55</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#a0c8b92f45308987231f9b0be8751d39f">Env::cycle</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> FD_ZERO(&<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">Master::_readfds</a>);</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_variable" href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">Master::_max_fd</a> = <a class="code hl_variable" href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">Master::_min_fd</a>;</div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_function" href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258">pre_select</a>();</div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> cout << <span class="stringliteral">"|===||===| Waiting some HTTP request... |===||===|\n"</span>;</div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">int</span> activity = select(<a class="code hl_variable" href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">Master::_min_fd</a> + <a class="code hl_variable" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">Master::_amount</a>, &(<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">Master::_readfds</a>), NULL, NULL, NULL);</div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">if</span> ((activity < 0) && (errno != EINTR))</div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> std::cerr << <span class="stringliteral">"Select: "</span> << strerror(errno) << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_function" href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713">post_select</a>();</div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>}</div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258"> 67</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258">Env::pre_select</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> cout << <span class="stringliteral">"==> Check sockets still alive to listen\n"</span>;</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">for</span> (std::vector<Master *>::iterator it = this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.begin(); it < this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.end(); it++)</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> (*it)->pre_select();</div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713"> 77</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713">Env::post_select</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> cout << <span class="stringliteral">"==> Handle requests and answers:\n"</span>;</div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">for</span> (std::vector<Master *>::iterator it = this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.begin(); it < this-><a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>.end(); it++)</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">try</span> {</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> (*it)->post_select(<span class="keyword">this</span>);</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> } <span class="keywordflow">catch</span> (std::exception &e) {</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> std::cerr << e.what();</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>}</div> |
|||
<div class="ttc" id="aclassEnv_html_a0c8b92f45308987231f9b0be8751d39f"><div class="ttname"><a href="classEnv.html#a0c8b92f45308987231f9b0be8751d39f">Env::cycle</a></div><div class="ttdeci">void cycle(void)</div><div class="ttdoc">A Wevserv cycle:</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00055">Env.cpp:55</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_a830b6a19d0ab40a20a67155e8e4fb713"><div class="ttname"><a href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713">Env::post_select</a></div><div class="ttdeci">void post_select(void)</div><div class="ttdoc">Refresh all master_sockets and their clients datas (disconnect, new connection, etc....</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00077">Env.cpp:77</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_aae7e70f6b1aa0ddc3e9b2766d1cbfb5e"><div class="ttname"><a href="classEnv.html#aae7e70f6b1aa0ddc3e9b2766d1cbfb5e">Env::~Env</a></div><div class="ttdeci">~Env(void)</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00040">Env.cpp:40</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ace0ebeb150673fa69526c14d8417d587"><div class="ttname"><a href="classEnv.html#ace0ebeb150673fa69526c14d8417d587">Env::Env</a></div><div class="ttdeci">Env(JSONNode *conf)</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00010">Env.cpp:10</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ace7f8bc745cd6d7ef2f5c410cfc09f4f"><div class="ttname"><a href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">Env::_masters</a></div><div class="ttdeci">std::vector< Master * > _masters</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00007">Env.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ae82dda3aafec12c1b84c55227d606304"><div class="ttname"><a href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">Env::_servers</a></div><div class="ttdeci">std::vector< Server * > _servers</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00006">Env.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_af4399c7f3d136ce2164dacef42f5c258"><div class="ttname"><a href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258">Env::pre_select</a></div><div class="ttdeci">void pre_select(void)</div><div class="ttdoc">Append each master_sockets and their clients to list of fds SELECT must look at.</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00067">Env.cpp:67</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_af554adf3353c753d3e3050fc04bd297f"><div class="ttname"><a href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">Env::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00008">Env.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a6412ecbb284cfddb5de9818b72c785f9"><div class="ttname"><a href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a></div><div class="ttdeci">JSONObject obj()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00003">Nodes.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ac6290ea016718b625b5a60ce176c75b8"><div class="ttname"><a href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">JSONNode::lst</a></div><div class="ttdeci">JSONList lst()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00008">Nodes.cpp:8</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a16a05173b1961ea7fc302319f06716a4"><div class="ttname"><a href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">Master::_readfds</a></div><div class="ttdeci">static fd_set _readfds</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00019">Master.hpp:19</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a2418abd3c0d0e9f4db769335cadd7545"><div class="ttname"><a href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">Master::_amount</a></div><div class="ttdeci">static int _amount</div><div class="ttdoc">< The higher one</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a40b24ae083809951e7d3e1a08d06fe65"><div class="ttname"><a href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">Master::_max_fd</a></div><div class="ttdeci">static int _max_fd</div><div class="ttdoc">< The lower socket fd</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a6c0dd4e4c7de17dea3de77f28e1de308"><div class="ttname"><a href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">Master::_min_fd</a></div><div class="ttdeci">static int _min_fd</div><div class="ttdoc">< The sockets fd which will be select</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a5738134631f6bab9a26ca0687d86f21f"><div class="ttname"><a href="classServer.html#a5738134631f6bab9a26ca0687d86f21f">Server::get_sockets</a></div><div class="ttdeci">std::vector< Master * > get_sockets(JSONNode *server)</div><div class="ttdoc">Create server's defined sockets:</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00079">Server.cpp:79</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Env.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Env.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Env.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Env_8hpp__incl.png" border="0" usemap="#aincludes_2Env_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Env_8hpp" id="aincludes_2Env_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1917,5,2047,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Env_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Env_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Env_8hppdep" id="aincludes_2Env_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1048,5,1179,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1032,79,1195,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="176,152,328,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="352,152,501,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="525,152,672,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="696,152,843,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="867,152,1016,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1041,152,1186,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1210,152,1329,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1353,152,1503,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1528,152,1677,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1701,152,1848,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1873,152,2007,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2032,152,2181,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2205,152,2357,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2382,152,2533,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2557,152,2715,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2739,152,2850,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2875,152,3008,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Env_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classEnv.html">Env</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Env_8hpp = |
|||
[ |
|||
[ "Env", "classEnv.html", "classEnv" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Env.hpp" name="includes/Env.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1048,5,1179,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1032,79,1195,104"/> |
|||
<area shape="rect" id="node3" href="$Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" id="node4" href="$Master_8hpp.html" title=" " alt="" coords="176,152,328,177"/> |
|||
<area shape="rect" id="node5" href="$Nodes_8hpp.html" title=" " alt="" coords="352,152,501,177"/> |
|||
<area shape="rect" id="node6" href="$Parser_8hpp.html" title=" " alt="" coords="525,152,672,177"/> |
|||
<area shape="rect" id="node7" href="$Route_8hpp.html" title=" " alt="" coords="696,152,843,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="867,152,1016,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1041,152,1186,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1210,152,1329,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1353,152,1503,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1528,152,1677,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1701,152,1848,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1873,152,2007,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2032,152,2181,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2205,152,2357,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2382,152,2533,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2557,152,2715,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2739,152,2850,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2875,152,3008,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
ecbb44159f742aa500c1d301d7fa2df1 |
After Width: | Height: | Size: 70 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Env.hpp" name="includes/Env.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1917,5,2047,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
4f7c8718037d249ed597fb10858ddac2 |
After Width: | Height: | Size: 104 KiB |
@ -0,0 +1,111 @@ |
|||
<!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: includes/Env.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Env.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Env_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classEnv.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classEnv.html">Env</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304"> 6</a></span> std::vector<Server *> <a class="code hl_variable" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">_servers</a>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"><a class="line" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f"> 7</a></span> std::vector<Master *> <a class="code hl_variable" href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">_masters</a>;</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="classEnv.html#af554adf3353c753d3e3050fc04bd297f"> 8</a></span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> <a class="code hl_variable" href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">_allowed_methods</a>;</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <a class="code hl_class" href="classEnv.html">Env</a>(<a class="code hl_class" href="classJSONNode.html">JSONNode</a> *conf);</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <a class="code hl_function" href="classEnv.html#aae7e70f6b1aa0ddc3e9b2766d1cbfb5e">~Env</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#a0c8b92f45308987231f9b0be8751d39f">cycle</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258">pre_select</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713">post_select</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>};</div> |
|||
<div class="ttc" id="aclassEnv_html"><div class="ttname"><a href="classEnv.html">Env</a></div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00004">Env.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_a0c8b92f45308987231f9b0be8751d39f"><div class="ttname"><a href="classEnv.html#a0c8b92f45308987231f9b0be8751d39f">Env::cycle</a></div><div class="ttdeci">void cycle(void)</div><div class="ttdoc">A Wevserv cycle:</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00055">Env.cpp:55</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_a830b6a19d0ab40a20a67155e8e4fb713"><div class="ttname"><a href="classEnv.html#a830b6a19d0ab40a20a67155e8e4fb713">Env::post_select</a></div><div class="ttdeci">void post_select(void)</div><div class="ttdoc">Refresh all master_sockets and their clients datas (disconnect, new connection, etc....</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00077">Env.cpp:77</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_aae7e70f6b1aa0ddc3e9b2766d1cbfb5e"><div class="ttname"><a href="classEnv.html#aae7e70f6b1aa0ddc3e9b2766d1cbfb5e">Env::~Env</a></div><div class="ttdeci">~Env(void)</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00040">Env.cpp:40</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ace7f8bc745cd6d7ef2f5c410cfc09f4f"><div class="ttname"><a href="classEnv.html#ace7f8bc745cd6d7ef2f5c410cfc09f4f">Env::_masters</a></div><div class="ttdeci">std::vector< Master * > _masters</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00007">Env.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ae82dda3aafec12c1b84c55227d606304"><div class="ttname"><a href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">Env::_servers</a></div><div class="ttdeci">std::vector< Server * > _servers</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00006">Env.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_af4399c7f3d136ce2164dacef42f5c258"><div class="ttname"><a href="classEnv.html#af4399c7f3d136ce2164dacef42f5c258">Env::pre_select</a></div><div class="ttdeci">void pre_select(void)</div><div class="ttdoc">Append each master_sockets and their clients to list of fds SELECT must look at.</div><div class="ttdef"><b>Definition:</b> <a href="Env_8cpp_source.html#l00067">Env.cpp:67</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_af554adf3353c753d3e3050fc04bd297f"><div class="ttname"><a href="classEnv.html#af554adf3353c753d3e3050fc04bd297f">Env::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00008">Env.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,140 @@ |
|||
<!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: srcs/sock/Master.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_b0f7ce2339e35a0e5afcbb3929376e00.html">sock</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Master.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
|
|||
<p>The master sockets class which receive each incomming new client. |
|||
<a href="#details">More...</a></p> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Master.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Master_8cpp__incl.png" border="0" usemap="#asrcs_2sock_2Master_8cpp" alt=""/></div> |
|||
<map name="asrcs_2sock_2Master_8cpp" id="asrcs_2sock_2Master_8cpp"> |
|||
<area shape="rect" title="The master sockets class which receive each incomming new client." alt="" coords="2003,5,2161,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Master_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
|||
<div class="textblock"><p>The master sockets class which receive each incomming new client. </p> |
|||
<dl class="section author"><dt>Author</dt><dd>Narnaud </dd></dl> |
|||
<dl class="section version"><dt>Version</dt><dd>0.1 </dd></dl> |
|||
<dl class="section date"><dt>Date</dt><dd>2023-01-12 </dd></dl> |
|||
|
|||
<p class="definition">Definition in file <a class="el" href="Master_8cpp_source.html">Master.cpp</a>.</p> |
|||
</div></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/sock/Master.cpp" name="srcs/sock/Master.cpp"> |
|||
<area shape="rect" id="node1" title="The master sockets class which receive each incomming new client." alt="" coords="2003,5,2161,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
7e194ab5fcfa3ec4fb33a63ef7ec31aa |
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,259 @@ |
|||
<!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: srcs/sock/Master.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_b0f7ce2339e35a0e5afcbb3929376e00.html">sock</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Master.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Master_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">/* Master destructor */</span></div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classMaster.html#aa76c335c36c93e8134115733938651df"> 11</a></span><a class="code hl_function" href="classMaster.html#aa76c335c36c93e8134115733938651df">Master::~Master</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> close(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>);</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> cout << <span class="stringliteral">"Destroyed master socket\n"</span>;</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span>}</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">/* |==========|</span></div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * Master constructor</span></div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * Try to create a socket listening to ip and port defined by input.</span></div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> * If the creation success, the socket is then ready to select for new clients.</span></div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment"> *</span></div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> * Input: A ip_port_t structure which contain the ip and the port the master</span></div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment"> * care about.</span></div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment"> * Output: A Master object.</span></div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment"> */</span></div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classMaster.html#aa32552c9c965ac5d53d2cb5e65b41b36"> 25</a></span><a class="code hl_function" href="classMaster.html#aa32552c9c965ac5d53d2cb5e65b41b36">Master::Master</a>(<a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> list) : _listen(list) {</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordtype">int</span> x = 1, port = <a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">port</a>;</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordtype">string</span> ip = <a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a>;</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a> = socket(AF_INET, SOCK_STREAM, 0);</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a> == 0)</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"socket() error"</span> + <span class="keywordtype">string</span>(strerror(errno)));</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">if</span> (setsockopt(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, SOL_SOCKET, SO_REUSEADDR, (<span class="keywordtype">char</span> *)&x, <span class="keyword">sizeof</span>(x)) < 0 && close(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>) <= 0)</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"setsockopt() error: "</span> + <span class="keywordtype">string</span>(strerror(errno)));</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>.sin_family = AF_INET;</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>.sin_addr.s_addr = inet_addr(ip.c_str());</div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>.sin_port = htons(port);</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">if</span> (bind(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, (<span class="keyword">struct</span> sockaddr *)&<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>, <span class="keyword">sizeof</span>(<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>)) && close(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>) <= 0)</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"bind() error: "</span> + <span class="keywordtype">string</span>(strerror(errno)));</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">if</span> (listen(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, 3) < 0 && close(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>) <= 0)</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"listen() error: "</span> + <span class="keywordtype">string</span>(strerror(errno)));</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> cout << <span class="stringliteral">"New master socket with fd "</span> << <a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a> << <span class="stringliteral">" which listen "</span> << ip << <span class="stringliteral">":"</span> << port << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a> < <a class="code hl_variable" href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">_min_fd</a>)</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_variable" href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">_min_fd</a> = <a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>;</div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_variable" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">_amount</a>++;</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>}</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">/* Set into static Master::readfds the active fds which will be select.*/</span></div> |
|||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div> |
|||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="classMaster.html#aa129a09fad260366b16aa04a7de173c2"> 50</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classMaster.html#aa129a09fad260366b16aa04a7de173c2">Master::pre_select</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> FD_SET(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, &<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">_readfds</a>);</div> |
|||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">for</span> (std::vector<Client *>::iterator child = <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.begin(); child < <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.end(); child++) {</div> |
|||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> FD_SET((*child)->_fd, &<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">_readfds</a>);</div> |
|||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">if</span> ((*child)->_fd > <a class="code hl_variable" href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">_max_fd</a>)</div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_variable" href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">_max_fd</a> = (*child)->_fd;</div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> }</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/* |==========|</span></div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment"> * Refresh master socket datas after select()</span></div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment"> * - look first for new clients</span></div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment"> * - look then if known clients sent requests or disconnected</span></div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"> * - if client sent request, handle it to generate answer adapted</span></div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> */</span></div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classMaster.html#a3ffb0ce7702a04ab7a9ec5dfa1ff6e42"> 65</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classMaster.html#a3ffb0ce7702a04ab7a9ec5dfa1ff6e42">Master::post_select</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env) {</div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">int</span> valread;</div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordtype">int</span> addrlen = <span class="keyword">sizeof</span>(<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>);</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">char</span> buffer[128];</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">if</span> (FD_ISSET(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, &<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">_readfds</a>)) { </div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">int</span> new_socket = accept(<a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>, (<span class="keyword">struct</span> sockaddr *)&<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>, (socklen_t *)&addrlen);</div> |
|||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">if</span> (new_socket < 0)</div> |
|||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"accept() error:"</span> + <span class="keywordtype">string</span>(strerror(errno)));</div> |
|||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="preprocessor">#ifdef __APPLE__</span></div> |
|||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> fcntl(new_socket, F_SETFL, O_NONBLOCK);</div> |
|||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="preprocessor">#endif</span></div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> cli_listen = <a class="code hl_function" href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358">get_ip_port_t</a>(inet_ntoa(<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>.sin_addr), ntohs(<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>.sin_port));</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.push_back(<span class="keyword">new</span> <a class="code hl_class" href="classClient.html">Client</a>(new_socket, cli_listen, <span class="keyword">this</span>));</div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <a class="code hl_variable" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">_amount</a>++;</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> }</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">int</span> child_fd;</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">for</span> (std::vector<Client *>::iterator it = <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.begin(); it < <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.end(); it++) {</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> child_fd = (*it)->_fd;</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">if</span> (FD_ISSET(child_fd, &<a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">_readfds</a>)) {</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> valread = read(child_fd, buffer, 128);</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> buffer[valread] = <span class="charliteral">'\0'</span>;</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">if</span> (valread == 0) {</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> getpeername(child_fd, (<span class="keyword">struct</span> sockaddr *)&<a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>, (socklen_t *)&addrlen);</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keyword">delete</span> (*it);</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>.erase(it);</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_variable" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">_amount</a>--;</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((*it)->getRequest(env, buffer))</div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> (*it)->handleRequest();</div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div> |
|||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div> |
|||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span>}</div> |
|||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment">/* |==========|</span></div> |
|||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> * Choose the server which must handle a request</span></div> |
|||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> * Each server can listen multiple range_ip:port and each range_ip:port can be</span></div> |
|||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> * listen by multiple servers. So for each request, we must look at the socket</span></div> |
|||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> * which given us the client to know how the client came. If multiple servers</span></div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> * listen the range from where the client came, ones with exact correspondance</span></div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"> * are prefered.</span></div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> *</span></div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> * If there are multiples servers listening exactly the ip the client try to</span></div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"> * reach or whic listen a range which contain it, the first one which have the</span></div> |
|||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment"> * same server_name as the host the client used to reach server is used, else</span></div> |
|||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment"> * it's the first one of exact correspondance or first one which have the ip</span></div> |
|||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"> * requested in his listen range.</span></div> |
|||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"> *</span></div> |
|||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment"> */</span></div> |
|||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div> |
|||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1"> 113</a></span><a class="code hl_class" href="classServer.html">Server</a> *<a class="code hl_function" href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">Master::choose_server</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env, <span class="keywordtype">string</span> host) {</div> |
|||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> std::vector<Server *> exact, inrange;</div> |
|||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> ip_listen, ip_required;</div> |
|||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div> |
|||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> ip_required = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(<a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a>, <span class="stringliteral">"."</span>);</div> |
|||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">for</span> (std::vector<Server *>::iterator server = env-><a class="code hl_variable" href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">_servers</a>.begin(); server < env->_servers.end(); server++) {</div> |
|||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> std::vector<ip_port_t> serv_listens = (*server)->_listens;</div> |
|||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">for</span> (std::vector<ip_port_t>::iterator it = serv_listens.begin(); it < serv_listens.end(); it++) {</div> |
|||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">port</a> != (*it).port)</div> |
|||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">continue</span>;</div> |
|||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a> == (*it).ip) {</div> |
|||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> exact.push_back(*server);</div> |
|||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">continue</span>;</div> |
|||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div> |
|||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordtype">bool</span> is_inrange = <span class="keyword">true</span>;</div> |
|||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> ip_listen = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>((*it).ip, <span class="stringliteral">"."</span>);</div> |
|||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> vec_string::iterator r = ip_required.begin();</div> |
|||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">for</span> (vec_string::iterator l = ip_listen.end(); l >= ip_listen.begin(); --l) {</div> |
|||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">if</span> (*l != *r && *l != <span class="stringliteral">"0"</span>)</div> |
|||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> is_inrange = <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</div> |
|||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (is_inrange)</div> |
|||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> inrange.push_back(*server);</div> |
|||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div> |
|||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div> |
|||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> std::cout << <span class="stringliteral">"req: "</span> << <a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a> << <span class="stringliteral">":"</span> << <a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>.<a class="code hl_variable" href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">port</a> << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">if</span> (exact.size() == 0) {</div> |
|||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::cout << <span class="stringliteral">"in range server check\n"</span>;</div> |
|||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">for</span> (std::vector<Server *>::iterator server = inrange.begin(); server < inrange.end(); server++) {</div> |
|||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">if</span> (host == (*server)->getName())</div> |
|||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">return</span> *server;</div> |
|||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div> |
|||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">return</span> inrange.front();</div> |
|||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> } <span class="keywordflow">else</span> {</div> |
|||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> std::cout << <span class="stringliteral">"exact server check\n"</span>;</div> |
|||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">for</span> (std::vector<Server *>::iterator server = exact.begin(); server < exact.end(); server++) {</div> |
|||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">if</span> (host == (*server)->getName())</div> |
|||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">return</span> *server;</div> |
|||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div> |
|||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">return</span> exact.front();</div> |
|||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> }</div> |
|||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>}</div> |
|||
<div class="ttc" id="aclassClient_html"><div class="ttname"><a href="classClient.html">Client</a></div><div class="ttdef"><b>Definition:</b> <a href="Client_8hpp_source.html#l00004">Client.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html"><div class="ttname"><a href="classEnv.html">Env</a></div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00004">Env.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassEnv_html_ae82dda3aafec12c1b84c55227d606304"><div class="ttname"><a href="classEnv.html#ae82dda3aafec12c1b84c55227d606304">Env::_servers</a></div><div class="ttdeci">std::vector< Server * > _servers</div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00006">Env.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a16a05173b1961ea7fc302319f06716a4"><div class="ttname"><a href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">Master::_readfds</a></div><div class="ttdeci">static fd_set _readfds</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00019">Master.hpp:19</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a2418abd3c0d0e9f4db769335cadd7545"><div class="ttname"><a href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">Master::_amount</a></div><div class="ttdeci">static int _amount</div><div class="ttdoc">< The higher one</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a2930920309de02e86050a8facdc83b68"><div class="ttname"><a href="classMaster.html#a2930920309de02e86050a8facdc83b68">Master::_address</a></div><div class="ttdeci">struct sockaddr_in _address</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00007">Master.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a3ffb0ce7702a04ab7a9ec5dfa1ff6e42"><div class="ttname"><a href="classMaster.html#a3ffb0ce7702a04ab7a9ec5dfa1ff6e42">Master::post_select</a></div><div class="ttdeci">void post_select(Env *env)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00065">Master.cpp:65</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a40b24ae083809951e7d3e1a08d06fe65"><div class="ttname"><a href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">Master::_max_fd</a></div><div class="ttdeci">static int _max_fd</div><div class="ttdoc">< The lower socket fd</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a5486cb0d32ba29cd31b212c3457942b1"><div class="ttname"><a href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">Master::choose_server</a></div><div class="ttdeci">Server * choose_server(Env *env, string host)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00113">Master.cpp:113</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a6c0dd4e4c7de17dea3de77f28e1de308"><div class="ttname"><a href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">Master::_min_fd</a></div><div class="ttdeci">static int _min_fd</div><div class="ttdoc">< The sockets fd which will be select</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aa129a09fad260366b16aa04a7de173c2"><div class="ttname"><a href="classMaster.html#aa129a09fad260366b16aa04a7de173c2">Master::pre_select</a></div><div class="ttdeci">void pre_select(void)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00050">Master.cpp:50</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aa32552c9c965ac5d53d2cb5e65b41b36"><div class="ttname"><a href="classMaster.html#aa32552c9c965ac5d53d2cb5e65b41b36">Master::Master</a></div><div class="ttdeci">Master(ip_port_t listen)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00025">Master.cpp:25</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aa76c335c36c93e8134115733938651df"><div class="ttname"><a href="classMaster.html#aa76c335c36c93e8134115733938651df">Master::~Master</a></div><div class="ttdeci">~Master(void)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00011">Master.cpp:11</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aee2fccb9a95dd83c89049c86a86ff5f3"><div class="ttname"><a href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">Master::_fd</a></div><div class="ttdeci">int _fd</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00005">Master.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_af4afc9ab34343b13939139087e280472"><div class="ttname"><a href="classMaster.html#af4afc9ab34343b13939139087e280472">Master::_childs</a></div><div class="ttdeci">std::vector< Client * > _childs</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00006">Master.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_af5432a935125075c1eb03aa9e8c8f894"><div class="ttname"><a href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">Master::_listen</a></div><div class="ttdeci">ip_port_t _listen</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00018">Master.hpp:18</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html"><div class="ttname"><a href="structip__port__s.html">ip_port_s</a></div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00035">webserv.hpp:35</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html_aae56f9ac0aa0193aaae11be127aa578e"><div class="ttname"><a href="structip__port__s.html#aae56f9ac0aa0193aaae11be127aa578e">ip_port_s::port</a></div><div class="ttdeci">int port</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00038">webserv.hpp:38</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html_afb20776a9723a50ac32fd9b8248b3e0c"><div class="ttname"><a href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip_port_s::ip</a></div><div class="ttdeci">string ip</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00037">webserv.hpp:37</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a4a79e98b5dec14d16875307f7e77dfb3"><div class="ttname"><a href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a></div><div class="ttdeci">vec_string split(string str, string delim)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00020">tools.cpp:20</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a6e7e23c21ae956b6859a6f3ec9793358"><div class="ttname"><a href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358">get_ip_port_t</a></div><div class="ttdeci">ip_port_t get_ip_port_t(string listen)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00035">tools.cpp:35</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_ad72dbcf6d0153db1b8d8a58001feed83"><div class="ttname"><a href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a></div><div class="ttdeci">#define DEBUG</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00002">webserv.hpp:2</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Master.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Master.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Master.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Master_8hpp__incl.png" border="0" usemap="#aincludes_2Master_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Master_8hpp" id="aincludes_2Master_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1906,5,2058,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2598,152,2689,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2713,152,2800,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2824,152,2913,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="2938,152,3026,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3050,152,3141,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3165,152,3239,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Master_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Master_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Master_8hppdep" id="aincludes_2Master_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1016,5,1168,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1011,79,1173,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="331,152,480,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="504,152,651,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="675,152,821,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="845,152,995,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1019,152,1165,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1189,152,1307,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1331,152,1482,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1507,152,1656,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1680,152,1827,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1851,152,1986,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2011,152,2160,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2184,152,2336,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2361,152,2511,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2536,152,2693,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2718,152,2829,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2853,152,2987,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Master_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classMaster.html">Master</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Master_8hpp = |
|||
[ |
|||
[ "Master", "classMaster.html", "classMaster" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Master.hpp" name="includes/Master.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1016,5,1168,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1011,79,1173,104"/> |
|||
<area shape="rect" id="node3" href="$Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" id="node4" href="$Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" id="node5" href="$Nodes_8hpp.html" title=" " alt="" coords="331,152,480,177"/> |
|||
<area shape="rect" id="node6" href="$Parser_8hpp.html" title=" " alt="" coords="504,152,651,177"/> |
|||
<area shape="rect" id="node7" href="$Route_8hpp.html" title=" " alt="" coords="675,152,821,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="845,152,995,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1019,152,1165,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1189,152,1307,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1331,152,1482,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1507,152,1656,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1680,152,1827,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1851,152,1986,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2011,152,2160,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2184,152,2336,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2361,152,2511,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2536,152,2693,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2718,152,2829,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2853,152,2987,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
a16aa2d49ec380fe137777233ff684f5 |
After Width: | Height: | Size: 70 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Master.hpp" name="includes/Master.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1906,5,2058,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Nodes_8hpp.html" title=" " alt="" coords="2598,152,2689,177"/> |
|||
<area shape="rect" id="node30" href="$Token_8hpp.html" title=" " alt="" coords="2713,152,2800,177"/> |
|||
<area shape="rect" id="node31" href="$Parser_8hpp.html" title=" " alt="" coords="2824,152,2913,177"/> |
|||
<area shape="rect" id="node32" href="$Route_8hpp.html" title=" " alt="" coords="2938,152,3026,177"/> |
|||
<area shape="rect" id="node33" href="$Server_8hpp.html" title=" " alt="" coords="3050,152,3141,177"/> |
|||
<area shape="rect" id="node34" href="$Env_8hpp.html" title=" " alt="" coords="3165,152,3239,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
c702ec1d4c116579c7d510c4e40daa6c |
After Width: | Height: | Size: 104 KiB |
@ -0,0 +1,124 @@ |
|||
<!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: includes/Master.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Master.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Master_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classMaster.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classMaster.html">Master</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"><a class="line" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3"> 5</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">_fd</a>;</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classMaster.html#af4afc9ab34343b13939139087e280472"> 6</a></span> std::vector<Client *> <a class="code hl_variable" href="classMaster.html#af4afc9ab34343b13939139087e280472">_childs</a>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"><a class="line" href="classMaster.html#a2930920309de02e86050a8facdc83b68"> 7</a></span> <span class="keyword">struct </span>sockaddr_in <a class="code hl_variable" href="classMaster.html#a2930920309de02e86050a8facdc83b68">_address</a>;</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <a class="code hl_class" href="classMaster.html">Master</a>(<a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> listen);</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classMaster.html#af169284c429812878d318cd2fb009254"> 11</a></span> <a class="code hl_function" href="classMaster.html#af169284c429812878d318cd2fb009254">Master</a>(<span class="keywordtype">int</span> fd, <a class="code hl_class" href="classMaster.html">Master</a> *parent);</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <a class="code hl_function" href="classMaster.html#aa76c335c36c93e8134115733938651df">~Master</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classMaster.html#aa129a09fad260366b16aa04a7de173c2">pre_select</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classMaster.html#a3ffb0ce7702a04ab7a9ec5dfa1ff6e42">post_select</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env);</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_class" href="classServer.html">Server</a> *<a class="code hl_function" href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">choose_server</a>(<a class="code hl_class" href="classEnv.html">Env</a> *env, <span class="keywordtype">string</span> host);</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894"> 18</a></span> <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> <a class="code hl_variable" href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">_listen</a>;</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4"> 19</a></span> <span class="keyword">static</span> fd_set <a class="code hl_variable" href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">_readfds</a>;</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545"> 20</a></span> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">_max_fd</a>, <a class="code hl_variable" href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">_min_fd</a>, <a class="code hl_variable" href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">_amount</a>;</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>};</div> |
|||
<div class="ttc" id="aclassEnv_html"><div class="ttname"><a href="classEnv.html">Env</a></div><div class="ttdef"><b>Definition:</b> <a href="Env_8hpp_source.html#l00004">Env.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html"><div class="ttname"><a href="classMaster.html">Master</a></div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00004">Master.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a16a05173b1961ea7fc302319f06716a4"><div class="ttname"><a href="classMaster.html#a16a05173b1961ea7fc302319f06716a4">Master::_readfds</a></div><div class="ttdeci">static fd_set _readfds</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00019">Master.hpp:19</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a2418abd3c0d0e9f4db769335cadd7545"><div class="ttname"><a href="classMaster.html#a2418abd3c0d0e9f4db769335cadd7545">Master::_amount</a></div><div class="ttdeci">static int _amount</div><div class="ttdoc">< The higher one</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a2930920309de02e86050a8facdc83b68"><div class="ttname"><a href="classMaster.html#a2930920309de02e86050a8facdc83b68">Master::_address</a></div><div class="ttdeci">struct sockaddr_in _address</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00007">Master.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a3ffb0ce7702a04ab7a9ec5dfa1ff6e42"><div class="ttname"><a href="classMaster.html#a3ffb0ce7702a04ab7a9ec5dfa1ff6e42">Master::post_select</a></div><div class="ttdeci">void post_select(Env *env)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00065">Master.cpp:65</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a40b24ae083809951e7d3e1a08d06fe65"><div class="ttname"><a href="classMaster.html#a40b24ae083809951e7d3e1a08d06fe65">Master::_max_fd</a></div><div class="ttdeci">static int _max_fd</div><div class="ttdoc">< The lower socket fd</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a5486cb0d32ba29cd31b212c3457942b1"><div class="ttname"><a href="classMaster.html#a5486cb0d32ba29cd31b212c3457942b1">Master::choose_server</a></div><div class="ttdeci">Server * choose_server(Env *env, string host)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00113">Master.cpp:113</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_a6c0dd4e4c7de17dea3de77f28e1de308"><div class="ttname"><a href="classMaster.html#a6c0dd4e4c7de17dea3de77f28e1de308">Master::_min_fd</a></div><div class="ttdeci">static int _min_fd</div><div class="ttdoc">< The sockets fd which will be select</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00020">Master.hpp:20</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aa129a09fad260366b16aa04a7de173c2"><div class="ttname"><a href="classMaster.html#aa129a09fad260366b16aa04a7de173c2">Master::pre_select</a></div><div class="ttdeci">void pre_select(void)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00050">Master.cpp:50</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aa76c335c36c93e8134115733938651df"><div class="ttname"><a href="classMaster.html#aa76c335c36c93e8134115733938651df">Master::~Master</a></div><div class="ttdeci">~Master(void)</div><div class="ttdef"><b>Definition:</b> <a href="Master_8cpp_source.html#l00011">Master.cpp:11</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_aee2fccb9a95dd83c89049c86a86ff5f3"><div class="ttname"><a href="classMaster.html#aee2fccb9a95dd83c89049c86a86ff5f3">Master::_fd</a></div><div class="ttdeci">int _fd</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00005">Master.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_af169284c429812878d318cd2fb009254"><div class="ttname"><a href="classMaster.html#af169284c429812878d318cd2fb009254">Master::Master</a></div><div class="ttdeci">Master(int fd, Master *parent)</div></div> |
|||
<div class="ttc" id="aclassMaster_html_af4afc9ab34343b13939139087e280472"><div class="ttname"><a href="classMaster.html#af4afc9ab34343b13939139087e280472">Master::_childs</a></div><div class="ttdeci">std::vector< Client * > _childs</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00006">Master.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html_af5432a935125075c1eb03aa9e8c8f894"><div class="ttname"><a href="classMaster.html#af5432a935125075c1eb03aa9e8c8f894">Master::_listen</a></div><div class="ttdeci">ip_port_t _listen</div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00018">Master.hpp:18</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html"><div class="ttname"><a href="structip__port__s.html">ip_port_s</a></div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00035">webserv.hpp:35</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,130 @@ |
|||
<!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: srcs/json/Nodes.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_31a26c189d85138570081afda2c0ac29.html">json</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Nodes.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Nodes.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Nodes_8cpp__incl.png" border="0" usemap="#asrcs_2json_2Nodes_8cpp" alt=""/></div> |
|||
<map name="asrcs_2json_2Nodes_8cpp" id="asrcs_2json_2Nodes_8cpp"> |
|||
<area shape="rect" title=" " alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Nodes_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/json/Nodes.cpp" name="srcs/json/Nodes.cpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
e144d4aee9cd2e3531cf1b9aa3472b4d |
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,221 @@ |
|||
<!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: srcs/json/Nodes.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_31a26c189d85138570081afda2c0ac29.html">json</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Nodes.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Nodes_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"><a class="line" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9"> 3</a></span><a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> <a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a>() {</div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> == <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">OBJECT</a>)</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> <span class="keywordflow">return</span> *<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a>;</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Improper return"</span>);</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span>}</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8"> 8</a></span><a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> <a class="code hl_function" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">JSONNode::lst</a>() {</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> == <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">LIST</a>)</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keywordflow">return</span> *<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a>;</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Improper return"</span>);</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span>}</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db"> 13</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">JSONNode::str</a>() {</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> == <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">STRING</a>)</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">return</span> *<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">str</a>;</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Improper return"</span>);</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>}</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c"> 18</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">JSONNode::nbr</a>() {</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> == <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">NUMBER</a>)</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">nbr</a>;</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Improper return"</span>);</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>}</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89"> 23</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">JSONNode::boo</a>() {</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> == <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">BOOLEAN</a>)</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">bValue</a>;</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"Improper return"</span>);</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span>}</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640"> 29</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">JSONNode::setObject</a>(<a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> *<span class="keywordtype">object</span>) {</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> this-><a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a> = object;</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">OBJECT</a>;</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e"> 33</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">JSONNode::setList</a>(<a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> *list) {</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> this-><a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a> = list;</div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">LIST</a>;</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span>}</div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e"> 37</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">JSONNode::setString</a>(<span class="keywordtype">string</span> *str) {</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> this-><a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">str</a> = <a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>;</div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">STRING</a>;</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af"> 41</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">JSONNode::setNumber</a>(<span class="keywordtype">int</span> nbr) {</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> this-><a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">nbr</a> = <a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">nbr</a>;</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">NUMBER</a>;</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680"> 45</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">JSONNode::setBoolean</a>(<span class="keywordtype">bool</span> v) {</div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> this-><a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">bValue</a> = v;</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">BOOLEAN</a>;</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div> |
|||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9"> 49</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">JSONNode::setNull</a>() { <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a> = <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac">NULL_TYPE</a>; }</div> |
|||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div> |
|||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classJSONNode.html#a885c754d39e9381a065f21b7a7872e1b"> 51</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classJSONNode.html#a885c754d39e9381a065f21b7a7872e1b">JSONNode::stringify</a>(<span class="keywordtype">int</span> indentationLevel) {</div> |
|||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">string</span> spaceString = string(indentationLevel, <span class="charliteral">' '</span>);</div> |
|||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="comment">// sstreams</span></div> |
|||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::stringstream output;</div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// cout < type << "\n";</span></div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">switch</span> (<a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a>) {</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">STRING</a>: {</div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> output << spaceString << *<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">str</a>;</div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">NUMBER</a>: {</div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> output << spaceString << <a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">nbr</a>;</div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">BOOLEAN</a>: {</div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> output << spaceString << (<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">bValue</a> ? <span class="stringliteral">"true"</span> : <span class="stringliteral">"false"</span>);</div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac">NULL_TYPE</a>: {</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> output << spaceString << <span class="stringliteral">"null"</span>;</div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div> |
|||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">LIST</a>: {</div> |
|||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// cout << "[";</span></div> |
|||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> output << spaceString << <span class="stringliteral">"[\n"</span>;</div> |
|||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index = 0;</div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">for</span> (JSONList::iterator i = (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a>).begin();</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> i != (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a>).end(); i++) {</div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> output << (*i)->stringify(indentationLevel + 1);</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (index < (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a>).size() - 1) {</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> output << <span class="stringliteral">",\n"</span>;</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> index++;</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> };</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> output << <span class="stringliteral">"\n"</span> << spaceString << <span class="stringliteral">"]\n"</span>;</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> }</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">OBJECT</a>: {</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> output << spaceString << <span class="stringliteral">"{\n"</span>;</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">for</span> (JSONObject::iterator i = (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a>).begin();</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> i != (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a>).end(); i++) {</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> output << spaceString << <span class="stringliteral">" "</span></div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> << <span class="stringliteral">"\""</span> << i->first << <span class="stringliteral">"\""</span></div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> << <span class="stringliteral">": "</span>;</div> |
|||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> output << i->second->stringify(indentationLevel + 1);</div> |
|||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> JSONObject::iterator next = i;</div> |
|||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> next++;</div> |
|||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">if</span> ((next) != (*<a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>.<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a>).end()) {</div> |
|||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> output << <span class="stringliteral">",\n"</span>;</div> |
|||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> }</div> |
|||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> output << spaceString << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> }</div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> output << spaceString << <span class="stringliteral">"}"</span>;</div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">return</span> output.str();</div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div> |
|||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">return</span> output.str();</div> |
|||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>}</div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">JSONNode::LIST</a></div><div class="ttdeci">@ LIST</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">JSONNode::NUMBER</a></div><div class="ttdeci">@ NUMBER</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">JSONNode::STRING</a></div><div class="ttdeci">@ STRING</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">JSONNode::BOOLEAN</a></div><div class="ttdeci">@ BOOLEAN</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac">JSONNode::NULL_TYPE</a></div><div class="ttdeci">@ NULL_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">JSONNode::OBJECT</a></div><div class="ttdeci">@ OBJECT</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a099a6f69f45a2fd1749d0df0b253d072"><div class="ttname"><a href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">JSONNode::values</a></div><div class="ttdeci">union JSONNode::Values values</div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a0abbf1d52e0c984569af190bcb70e640"><div class="ttname"><a href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">JSONNode::setObject</a></div><div class="ttdeci">void setObject(JSONObject *object)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00029">Nodes.cpp:29</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3bc7e92d02901b9605fb96a9637c16ae"><div class="ttname"><a href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">JSONNode::type</a></div><div class="ttdeci">Type type</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00021">Nodes.hpp:21</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3c65ea4af29daa3869273af827ebe43c"><div class="ttname"><a href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">JSONNode::nbr</a></div><div class="ttdeci">int nbr()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00018">Nodes.cpp:18</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a625fbde0f162e32c4de6b8df32f0a0af"><div class="ttname"><a href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">JSONNode::setNumber</a></div><div class="ttdeci">void setNumber(int nbr)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00041">Nodes.cpp:41</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a6412ecbb284cfddb5de9818b72c785f9"><div class="ttname"><a href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a></div><div class="ttdeci">JSONObject obj()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00003">Nodes.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a70bb6ffc78aae08eb6afead5cddadee9"><div class="ttname"><a href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">JSONNode::setNull</a></div><div class="ttdeci">void setNull()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00049">Nodes.cpp:49</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a7cfe3d9edfbc49ef0d1d78fa3f294680"><div class="ttname"><a href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">JSONNode::setBoolean</a></div><div class="ttdeci">void setBoolean(bool v)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00045">Nodes.cpp:45</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a885c754d39e9381a065f21b7a7872e1b"><div class="ttname"><a href="classJSONNode.html#a885c754d39e9381a065f21b7a7872e1b">JSONNode::stringify</a></div><div class="ttdeci">string stringify(int indentationLevel)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00051">Nodes.cpp:51</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ac6290ea016718b625b5a60ce176c75b8"><div class="ttname"><a href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">JSONNode::lst</a></div><div class="ttdeci">JSONList lst()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00008">Nodes.cpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acc698e882b650c5679469ccd376b39db"><div class="ttname"><a href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">JSONNode::str</a></div><div class="ttdeci">string str()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00013">Nodes.cpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acfb95d8ee5d047099424d55f1fc07e3e"><div class="ttname"><a href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">JSONNode::setString</a></div><div class="ttdeci">void setString(string *str)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00037">Nodes.cpp:37</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ae4e89e9fbf82c980d2facf7edc1ea68e"><div class="ttname"><a href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">JSONNode::setList</a></div><div class="ttdeci">void setList(JSONList *list)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00033">Nodes.cpp:33</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_aed3bd34b9670b2e14dc2a3d08cb19d89"><div class="ttname"><a href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">JSONNode::boo</a></div><div class="ttdeci">bool boo()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00023">Nodes.cpp:23</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a10b0348a1b3e9753979ecec2d59e40ce"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">JSONNode::Values::list</a></div><div class="ttdeci">JSONList * list</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00016">Nodes.hpp:16</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a13d039caf30fae94b24c30719976b53d"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">JSONNode::Values::object</a></div><div class="ttdeci">JSONObject * object</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00015">Nodes.hpp:15</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a27aaadce567199b09361e637e2f8e276"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">JSONNode::Values::nbr</a></div><div class="ttdeci">int nbr</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00018">Nodes.hpp:18</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a5474474aa3c993a4d63a27904ec0fcca"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">JSONNode::Values::bValue</a></div><div class="ttdeci">bool bValue</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00019">Nodes.hpp:19</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_afb442ccc10e057e1ccec271cfac08731"><div class="ttname"><a href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">JSONNode::Values::str</a></div><div class="ttdeci">string * str</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00017">Nodes.hpp:17</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_adfa52a9e5ae79ca0eff47012a29449e3"><div class="ttname"><a href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a></div><div class="ttdeci">std::map< string, JSONNode * > JSONObject</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00048">webserv.hpp:48</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,166 @@ |
|||
<!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: includes/Nodes.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Nodes.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Nodes.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Nodes_8hpp__incl.png" border="0" usemap="#aincludes_2Nodes_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Nodes_8hpp" id="aincludes_2Nodes_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1907,5,2057,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2717,152,2804,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2828,152,2917,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="2942,152,3030,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3054,152,3145,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3169,152,3243,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Nodes_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Nodes_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Nodes_8hppdep" id="aincludes_2Nodes_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1020,5,1169,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1013,79,1176,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="507,152,653,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="677,152,824,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="848,152,997,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1022,152,1167,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1191,152,1310,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1334,152,1485,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1509,152,1659,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1683,152,1829,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1854,152,1989,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2013,152,2163,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2187,152,2339,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2363,152,2514,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2539,152,2696,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2721,152,2831,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2856,152,2989,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Nodes_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classJSONNode.html">JSONNode</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">union  </td><td class="memItemRight" valign="bottom"><a class="el" href="unionJSONNode_1_1Values.html">JSONNode::Values</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Nodes_8hpp = |
|||
[ |
|||
[ "JSONNode", "classJSONNode.html", "classJSONNode" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Nodes.hpp" name="includes/Nodes.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1020,5,1169,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1013,79,1176,104"/> |
|||
<area shape="rect" id="node3" href="$Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" id="node4" href="$Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" id="node5" href="$Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" id="node6" href="$Parser_8hpp.html" title=" " alt="" coords="507,152,653,177"/> |
|||
<area shape="rect" id="node7" href="$Route_8hpp.html" title=" " alt="" coords="677,152,824,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="848,152,997,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1022,152,1167,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1191,152,1310,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1334,152,1485,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1509,152,1659,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1683,152,1829,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1854,152,1989,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2013,152,2163,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2187,152,2339,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2363,152,2514,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2539,152,2696,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2721,152,2831,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2856,152,2989,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
d64119e12f53bc96e902bc1ad95a36f7 |
After Width: | Height: | Size: 69 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Nodes.hpp" name="includes/Nodes.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1907,5,2057,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Token_8hpp.html" title=" " alt="" coords="2717,152,2804,177"/> |
|||
<area shape="rect" id="node31" href="$Parser_8hpp.html" title=" " alt="" coords="2828,152,2917,177"/> |
|||
<area shape="rect" id="node32" href="$Route_8hpp.html" title=" " alt="" coords="2942,152,3030,177"/> |
|||
<area shape="rect" id="node33" href="$Server_8hpp.html" title=" " alt="" coords="3054,152,3145,177"/> |
|||
<area shape="rect" id="node34" href="$Env_8hpp.html" title=" " alt="" coords="3169,152,3243,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
96fafc03dd0ed18812128f64d6c1bd2d |
After Width: | Height: | Size: 105 KiB |
@ -0,0 +1,149 @@ |
|||
<!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: includes/Nodes.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Nodes.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Nodes_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classJSONNode.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> <span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> <a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>();</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> <a class="code hl_function" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">lst</a>();</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>();</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">nbr</a>();</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">boo</a>();</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">private</span>:</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7"> 13</a></span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979e">Type</a> { <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">OBJECT</a>, <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">LIST</a>, <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">STRING</a>, <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">NUMBER</a>, <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">BOOLEAN</a>, <a class="code hl_enumvalue" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac">NULL_TYPE</a> };</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html"> 14</a></span> <span class="keyword">union </span><a class="code hl_union" href="unionJSONNode_1_1Values.html">Values</a> {</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d"> 15</a></span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> *<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">object</a>;</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce"> 16</a></span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> *<a class="code hl_variable" href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">list</a>;</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731"> 17</a></span> <span class="keywordtype">string</span> *<a class="code hl_variable" href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">str</a>;</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276"> 18</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">nbr</a>;</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca"> 19</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">bValue</a>;</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072"> 20</a></span> } <a class="code hl_variable" href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">values</a>;</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae"> 21</a></span> <a class="code hl_enumeration" href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979e">Type</a> <a class="code hl_variable" href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">type</a>;</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">setObject</a>(<a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> *<span class="keywordtype">object</span>);</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">setList</a>(<a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> *list);</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">setString</a>(<span class="keywordtype">string</span> *<a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>);</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">setNumber</a>(<span class="keywordtype">int</span> <a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">nbr</a>);</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">setBoolean</a>(<span class="keywordtype">bool</span> v);</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">setNull</a>();</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classJSONNode.html#a885c754d39e9381a065f21b7a7872e1b">stringify</a>(<span class="keywordtype">int</span> indentationLevel);</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classJSONNode.html#a9e338ce4ffa591eecb3accc677732641"> 31</a></span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classJSONParser.html">JSONParser</a>;</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>};</div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979e"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979e">JSONNode::Type</a></div><div class="ttdeci">Type</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea03865327b1b7f1c205601782bbf69cf8">JSONNode::LIST</a></div><div class="ttdeci">@ LIST</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea1f0067fac17d13d4cbeb1bbad246318a">JSONNode::NUMBER</a></div><div class="ttdeci">@ NUMBER</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea4db1728ff35972debaab235bf132514a">JSONNode::STRING</a></div><div class="ttdeci">@ STRING</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea63852c0442f17366880e9d9b0e1c2ef7">JSONNode::BOOLEAN</a></div><div class="ttdeci">@ BOOLEAN</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979ea665d4cf1cd69bed76f4eb122ed2e58ac">JSONNode::NULL_TYPE</a></div><div class="ttdeci">@ NULL_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f"><div class="ttname"><a href="classJSONNode.html#a01a15c604fd78caa85b6875c3bfb979eafd160d24abdefc01a4d540ef5b956c1f">JSONNode::OBJECT</a></div><div class="ttdeci">@ OBJECT</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00013">Nodes.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a099a6f69f45a2fd1749d0df0b253d072"><div class="ttname"><a href="classJSONNode.html#a099a6f69f45a2fd1749d0df0b253d072">JSONNode::values</a></div><div class="ttdeci">union JSONNode::Values values</div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a0abbf1d52e0c984569af190bcb70e640"><div class="ttname"><a href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">JSONNode::setObject</a></div><div class="ttdeci">void setObject(JSONObject *object)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00029">Nodes.cpp:29</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3bc7e92d02901b9605fb96a9637c16ae"><div class="ttname"><a href="classJSONNode.html#a3bc7e92d02901b9605fb96a9637c16ae">JSONNode::type</a></div><div class="ttdeci">Type type</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00021">Nodes.hpp:21</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3c65ea4af29daa3869273af827ebe43c"><div class="ttname"><a href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">JSONNode::nbr</a></div><div class="ttdeci">int nbr()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00018">Nodes.cpp:18</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a625fbde0f162e32c4de6b8df32f0a0af"><div class="ttname"><a href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">JSONNode::setNumber</a></div><div class="ttdeci">void setNumber(int nbr)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00041">Nodes.cpp:41</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a6412ecbb284cfddb5de9818b72c785f9"><div class="ttname"><a href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a></div><div class="ttdeci">JSONObject obj()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00003">Nodes.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a70bb6ffc78aae08eb6afead5cddadee9"><div class="ttname"><a href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">JSONNode::setNull</a></div><div class="ttdeci">void setNull()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00049">Nodes.cpp:49</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a7cfe3d9edfbc49ef0d1d78fa3f294680"><div class="ttname"><a href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">JSONNode::setBoolean</a></div><div class="ttdeci">void setBoolean(bool v)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00045">Nodes.cpp:45</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a885c754d39e9381a065f21b7a7872e1b"><div class="ttname"><a href="classJSONNode.html#a885c754d39e9381a065f21b7a7872e1b">JSONNode::stringify</a></div><div class="ttdeci">string stringify(int indentationLevel)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00051">Nodes.cpp:51</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ac6290ea016718b625b5a60ce176c75b8"><div class="ttname"><a href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">JSONNode::lst</a></div><div class="ttdeci">JSONList lst()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00008">Nodes.cpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acc698e882b650c5679469ccd376b39db"><div class="ttname"><a href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">JSONNode::str</a></div><div class="ttdeci">string str()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00013">Nodes.cpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acfb95d8ee5d047099424d55f1fc07e3e"><div class="ttname"><a href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">JSONNode::setString</a></div><div class="ttdeci">void setString(string *str)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00037">Nodes.cpp:37</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ae4e89e9fbf82c980d2facf7edc1ea68e"><div class="ttname"><a href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">JSONNode::setList</a></div><div class="ttdeci">void setList(JSONList *list)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00033">Nodes.cpp:33</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_aed3bd34b9670b2e14dc2a3d08cb19d89"><div class="ttname"><a href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">JSONNode::boo</a></div><div class="ttdeci">bool boo()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00023">Nodes.cpp:23</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html"><div class="ttname"><a href="classJSONParser.html">JSONParser</a></div><div class="ttdef"><b>Definition:</b> <a href="Parser_8hpp_source.html#l00004">Parser.hpp:4</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html"><div class="ttname"><a href="unionJSONNode_1_1Values.html">JSONNode::Values</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00014">Nodes.hpp:14</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a10b0348a1b3e9753979ecec2d59e40ce"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a10b0348a1b3e9753979ecec2d59e40ce">JSONNode::Values::list</a></div><div class="ttdeci">JSONList * list</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00016">Nodes.hpp:16</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a13d039caf30fae94b24c30719976b53d"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a13d039caf30fae94b24c30719976b53d">JSONNode::Values::object</a></div><div class="ttdeci">JSONObject * object</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00015">Nodes.hpp:15</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a27aaadce567199b09361e637e2f8e276"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a27aaadce567199b09361e637e2f8e276">JSONNode::Values::nbr</a></div><div class="ttdeci">int nbr</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00018">Nodes.hpp:18</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_a5474474aa3c993a4d63a27904ec0fcca"><div class="ttname"><a href="unionJSONNode_1_1Values.html#a5474474aa3c993a4d63a27904ec0fcca">JSONNode::Values::bValue</a></div><div class="ttdeci">bool bValue</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00019">Nodes.hpp:19</a></div></div> |
|||
<div class="ttc" id="aunionJSONNode_1_1Values_html_afb442ccc10e057e1ccec271cfac08731"><div class="ttname"><a href="unionJSONNode_1_1Values.html#afb442ccc10e057e1ccec271cfac08731">JSONNode::Values::str</a></div><div class="ttdeci">string * str</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00017">Nodes.hpp:17</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_adfa52a9e5ae79ca0eff47012a29449e3"><div class="ttname"><a href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a></div><div class="ttdeci">std::map< string, JSONNode * > JSONObject</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00048">webserv.hpp:48</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,130 @@ |
|||
<!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: srcs/json/Parser.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_31a26c189d85138570081afda2c0ac29.html">json</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Parser.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Parser.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Parser_8cpp__incl.png" border="0" usemap="#asrcs_2json_2Parser_8cpp" alt=""/></div> |
|||
<map name="asrcs_2json_2Parser_8cpp" id="asrcs_2json_2Parser_8cpp"> |
|||
<area shape="rect" title=" " alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Parser_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/json/Parser.cpp" name="srcs/json/Parser.cpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
330bf1926a4ae5599db318188ddf08ee |
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,320 @@ |
|||
<!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: srcs/json/Parser.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_31a26c189d85138570081afda2c0ac29.html">json</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Parser.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Parser_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"><a class="line" href="classJSONParser.html#a454c91e50419d949c3c74cd9e49e4d3e"> 3</a></span><a class="code hl_function" href="classJSONParser.html#a454c91e50419d949c3c74cd9e49e4d3e">JSONParser::JSONParser</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> filename) : tokenizer(filename) {}</div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"><a class="line" href="classJSONParser.html#ac397e1ef199b5cd553c1dece740a045e"> 5</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#ac397e1ef199b5cd553c1dece740a045e">JSONParser::parse</a>() {</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <span class="keywordtype">string</span> key = <span class="stringliteral">""</span>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *parsed;</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="keywordflow">while</span> (<a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ace80ed64add3ef2d0ee9f659a182d935">hasMoreTokens</a>()) {</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token;</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <span class="keywordflow">try</span> {</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <span class="keywordflow">switch</span> (token.<a class="code hl_variable" href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">type</a>) {</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a50e6b569a6062129ae6db26de31ed634">CURLY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> parsed = <a class="code hl_function" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">parseObject</a>();</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> }</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a69bc977cb9fc1fb8e85c2f5898a72ac7">ARRAY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> parsed = <a class="code hl_function" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">parseList</a>();</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> }</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928aee847e634a4297b274316de8a8ca9921">STRING</a>: {</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> parsed = <a class="code hl_function" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">parseString</a>();</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> }</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a12a90dfe20486bbe3e075afcd19ef2d0">NUMBER</a>: {</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> parsed = <a class="code hl_function" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">parseNumber</a>();</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8a583f16e8d237a423c8c1d9087a4c72">BOOLEAN</a>: {</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> parsed = <a class="code hl_function" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">parseBoolean</a>();</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">default</span>:</div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> } <span class="keywordflow">catch</span> (std::logic_error &e) {</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> }</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> parsed;</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389"> 46</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">JSONParser::parseObject</a>() {</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>;</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> *keyObjectMap = <span class="keyword">new</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a>;</div> |
|||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">while</span> (1) {</div> |
|||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ace80ed64add3ef2d0ee9f659a182d935">hasMoreTokens</a>()) {</div> |
|||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">string</span> key = token.<a class="code hl_variable" href="structToken__s.html#a587f8b8850febdfcda82cbf8333940a4">value</a>;</div> |
|||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">switch</span> (token.<a class="code hl_variable" href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">type</a>) {</div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a50e6b569a6062129ae6db26de31ed634">CURLY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> cout << <span class="stringliteral">"=object=|"</span> << key << <span class="stringliteral">"|===>>\n"</span>;</div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">parseObject</a>();</div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> cout << <span class="stringliteral">"<<===end object\n"</span>;</div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a69bc977cb9fc1fb8e85c2f5898a72ac7">ARRAY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> cout << <span class="stringliteral">"-list-|"</span> << key << <span class="stringliteral">"|--->>\n"</span>;</div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">parseList</a>();</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> cout << <span class="stringliteral">"<<---end list\n"</span>;</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div> |
|||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928aee847e634a4297b274316de8a8ca9921">STRING</a>: {</div> |
|||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">parseString</a>();</div> |
|||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> cout << key << <span class="stringliteral">"='"</span> << (*keyObjectMap)[key]->str() << <span class="stringliteral">"'\n"</span>;</div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a12a90dfe20486bbe3e075afcd19ef2d0">NUMBER</a>: {</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">parseNumber</a>();</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> cout << key << <span class="stringliteral">"="</span> << (*keyObjectMap)[key]->nbr() << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8a583f16e8d237a423c8c1d9087a4c72">BOOLEAN</a>: {</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">parseBoolean</a>();</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> cout << key << <span class="stringliteral">"(BOOL)\n"</span>;</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a74cf8825b522b9721ea02973803d76b4">NULL_TYPE</a>: {</div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> (*keyObjectMap)[key] = <a class="code hl_function" href="classJSONParser.html#a914758f808caf1443960df96d98810cc">parseNull</a>();</div> |
|||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div> |
|||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">default</span>:</div> |
|||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div> |
|||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">if</span> (token.<a class="code hl_variable" href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">type</a> == <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928ab7b2767f4af70f630238c234b74372e3">CURLY_CLOSE</a>)</div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> } <span class="keywordflow">else</span> {</div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"No more tokens"</span>);</div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div> |
|||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div> |
|||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> node-><a class="code hl_function" href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">setObject</a>(keyObjectMap);</div> |
|||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>}</div> |
|||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88"> 111</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">JSONParser::parseList</a>() {</div> |
|||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>();</div> |
|||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> *list = <span class="keyword">new</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a>();</div> |
|||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">bool</span> hasCompleted = <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">while</span> (!hasCompleted) {</div> |
|||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ace80ed64add3ef2d0ee9f659a182d935">hasMoreTokens</a>()) {</div> |
|||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"No more tokens"</span>);</div> |
|||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> } <span class="keywordflow">else</span> {</div> |
|||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *subNode;</div> |
|||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">switch</span> (token.<a class="code hl_variable" href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">type</a>) {</div> |
|||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a50e6b569a6062129ae6db26de31ed634">CURLY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> cout << <span class="stringliteral">"=object===>>\n"</span>;</div> |
|||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> subNode = <a class="code hl_function" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">parseObject</a>();</div> |
|||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> cout << <span class="stringliteral">"<<===end object\n"</span>;</div> |
|||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div> |
|||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a69bc977cb9fc1fb8e85c2f5898a72ac7">ARRAY_OPEN</a>: {</div> |
|||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> cout << <span class="stringliteral">"-list--->>\n"</span>;</div> |
|||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> subNode = <a class="code hl_function" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">parseList</a>();</div> |
|||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> cout << <span class="stringliteral">"<<---end list\n"</span>;</div> |
|||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div> |
|||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928aee847e634a4297b274316de8a8ca9921">STRING</a>: {</div> |
|||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> subNode = <a class="code hl_function" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">parseString</a>();</div> |
|||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> cout << <span class="stringliteral">"|'"</span> << subNode-><a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>() << <span class="stringliteral">"'"</span>;</div> |
|||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> }</div> |
|||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a12a90dfe20486bbe3e075afcd19ef2d0">NUMBER</a>: {</div> |
|||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> subNode = <a class="code hl_function" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">parseNumber</a>();</div> |
|||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> cout << <span class="stringliteral">"|"</span> << subNode-><a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">nbr</a>();</div> |
|||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> }</div> |
|||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8a583f16e8d237a423c8c1d9087a4c72">BOOLEAN</a>: {</div> |
|||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">rollBackToken</a>();</div> |
|||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> subNode = <a class="code hl_function" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">parseBoolean</a>();</div> |
|||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div> |
|||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a74cf8825b522b9721ea02973803d76b4">NULL_TYPE</a>: {</div> |
|||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> subNode = <a class="code hl_function" href="classJSONParser.html#a914758f808caf1443960df96d98810cc">parseNull</a>();</div> |
|||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div> |
|||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">default</span>:</div> |
|||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div> |
|||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> list->push_back(subNode);</div> |
|||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">if</span> (token.<a class="code hl_variable" href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">type</a> == <a class="code hl_enumvalue" href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8d7d97ea3ba9c9e041c1c79aa0d41786">ARRAY_CLOSE</a>) {</div> |
|||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> hasCompleted = <span class="keyword">true</span>;</div> |
|||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> }</div> |
|||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> }</div> |
|||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> }</div> |
|||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> node-><a class="code hl_function" href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">setList</a>(list);</div> |
|||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span>}</div> |
|||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4"> 174</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">JSONParser::parseString</a>() {</div> |
|||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>();</div> |
|||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordtype">string</span> *sValue = <span class="keyword">new</span> string(token.<a class="code hl_variable" href="structToken__s.html#a587f8b8850febdfcda82cbf8333940a4">value</a>);</div> |
|||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> node-><a class="code hl_function" href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">setString</a>(sValue);</div> |
|||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span>}</div> |
|||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf"> 181</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">JSONParser::parseNumber</a>() {</div> |
|||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>();</div> |
|||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordtype">string</span> value = token.<a class="code hl_variable" href="structToken__s.html#a587f8b8850febdfcda82cbf8333940a4">value</a>;</div> |
|||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">int</span> nbr = std::atoi(value.c_str());</div> |
|||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> node-><a class="code hl_function" href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">setNumber</a>(nbr);</div> |
|||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span>}</div> |
|||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572"> 189</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">JSONParser::parseBoolean</a>() {</div> |
|||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>();</div> |
|||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <a class="code hl_struct" href="structToken__s.html">Token</a> token = <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>.<a class="code hl_function" href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">getToken</a>();</div> |
|||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> node-><a class="code hl_function" href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">setBoolean</a>(token.<a class="code hl_variable" href="structToken__s.html#a587f8b8850febdfcda82cbf8333940a4">value</a> == <span class="stringliteral">"True"</span> ? <span class="keyword">true</span> : <span class="keyword">false</span>);</div> |
|||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>}</div> |
|||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="classJSONParser.html#a914758f808caf1443960df96d98810cc"> 195</a></span><a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a914758f808caf1443960df96d98810cc">JSONParser::parseNull</a>() {</div> |
|||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *node = <span class="keyword">new</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a>();</div> |
|||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> node-><a class="code hl_function" href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">setNull</a>();</div> |
|||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="keywordflow">return</span> node;</div> |
|||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>}</div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a12a90dfe20486bbe3e075afcd19ef2d0"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a12a90dfe20486bbe3e075afcd19ef2d0">NUMBER</a></div><div class="ttdeci">@ NUMBER</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00009">Token.hpp:9</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a50e6b569a6062129ae6db26de31ed634"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a50e6b569a6062129ae6db26de31ed634">CURLY_OPEN</a></div><div class="ttdeci">@ CURLY_OPEN</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00005">Token.hpp:5</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a69bc977cb9fc1fb8e85c2f5898a72ac7"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a69bc977cb9fc1fb8e85c2f5898a72ac7">ARRAY_OPEN</a></div><div class="ttdeci">@ ARRAY_OPEN</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00010">Token.hpp:10</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a74cf8825b522b9721ea02973803d76b4"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a74cf8825b522b9721ea02973803d76b4">NULL_TYPE</a></div><div class="ttdeci">@ NULL_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00015">Token.hpp:14</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a8a583f16e8d237a423c8c1d9087a4c72"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8a583f16e8d237a423c8c1d9087a4c72">BOOLEAN</a></div><div class="ttdeci">@ BOOLEAN</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00013">Token.hpp:13</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928a8d7d97ea3ba9c9e041c1c79aa0d41786"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928a8d7d97ea3ba9c9e041c1c79aa0d41786">ARRAY_CLOSE</a></div><div class="ttdeci">@ ARRAY_CLOSE</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00011">Token.hpp:11</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928ab7b2767f4af70f630238c234b74372e3"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928ab7b2767f4af70f630238c234b74372e3">CURLY_CLOSE</a></div><div class="ttdeci">@ CURLY_CLOSE</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00006">Token.hpp:6</a></div></div> |
|||
<div class="ttc" id="aToken_8hpp_html_ac6f62333aafcf3546f487ccd7caa9928aee847e634a4297b274316de8a8ca9921"><div class="ttname"><a href="Token_8hpp.html#ac6f62333aafcf3546f487ccd7caa9928aee847e634a4297b274316de8a8ca9921">STRING</a></div><div class="ttdeci">@ STRING</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00008">Token.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a0abbf1d52e0c984569af190bcb70e640"><div class="ttname"><a href="classJSONNode.html#a0abbf1d52e0c984569af190bcb70e640">JSONNode::setObject</a></div><div class="ttdeci">void setObject(JSONObject *object)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00029">Nodes.cpp:29</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3c65ea4af29daa3869273af827ebe43c"><div class="ttname"><a href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">JSONNode::nbr</a></div><div class="ttdeci">int nbr()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00018">Nodes.cpp:18</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a625fbde0f162e32c4de6b8df32f0a0af"><div class="ttname"><a href="classJSONNode.html#a625fbde0f162e32c4de6b8df32f0a0af">JSONNode::setNumber</a></div><div class="ttdeci">void setNumber(int nbr)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00041">Nodes.cpp:41</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a70bb6ffc78aae08eb6afead5cddadee9"><div class="ttname"><a href="classJSONNode.html#a70bb6ffc78aae08eb6afead5cddadee9">JSONNode::setNull</a></div><div class="ttdeci">void setNull()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00049">Nodes.cpp:49</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a7cfe3d9edfbc49ef0d1d78fa3f294680"><div class="ttname"><a href="classJSONNode.html#a7cfe3d9edfbc49ef0d1d78fa3f294680">JSONNode::setBoolean</a></div><div class="ttdeci">void setBoolean(bool v)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00045">Nodes.cpp:45</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acc698e882b650c5679469ccd376b39db"><div class="ttname"><a href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">JSONNode::str</a></div><div class="ttdeci">string str()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00013">Nodes.cpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acfb95d8ee5d047099424d55f1fc07e3e"><div class="ttname"><a href="classJSONNode.html#acfb95d8ee5d047099424d55f1fc07e3e">JSONNode::setString</a></div><div class="ttdeci">void setString(string *str)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00037">Nodes.cpp:37</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ae4e89e9fbf82c980d2facf7edc1ea68e"><div class="ttname"><a href="classJSONNode.html#ae4e89e9fbf82c980d2facf7edc1ea68e">JSONNode::setList</a></div><div class="ttdeci">void setList(JSONList *list)</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00033">Nodes.cpp:33</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a0ef04e64c276d2f24d02689ce1c101bc"><div class="ttname"><a href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">JSONParser::tokenizer</a></div><div class="ttdeci">Tokenizer tokenizer</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8hpp_source.html#l00006">Parser.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a1ca29ba38533304c6601eafd249d9ed4"><div class="ttname"><a href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">JSONParser::parseString</a></div><div class="ttdeci">JSONNode * parseString()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00174">Parser.cpp:174</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a2d1a9d64e8bedc107cb5c9e7c4143fdf"><div class="ttname"><a href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">JSONParser::parseNumber</a></div><div class="ttdeci">JSONNode * parseNumber()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00181">Parser.cpp:181</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a454c91e50419d949c3c74cd9e49e4d3e"><div class="ttname"><a href="classJSONParser.html#a454c91e50419d949c3c74cd9e49e4d3e">JSONParser::JSONParser</a></div><div class="ttdeci">JSONParser(const string filename)</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00003">Parser.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a7d5a3239976c55ca83d974c886146f88"><div class="ttname"><a href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">JSONParser::parseList</a></div><div class="ttdeci">JSONNode * parseList()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00111">Parser.cpp:111</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a914758f808caf1443960df96d98810cc"><div class="ttname"><a href="classJSONParser.html#a914758f808caf1443960df96d98810cc">JSONParser::parseNull</a></div><div class="ttdeci">JSONNode * parseNull()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00195">Parser.cpp:195</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_ac397e1ef199b5cd553c1dece740a045e"><div class="ttname"><a href="classJSONParser.html#ac397e1ef199b5cd553c1dece740a045e">JSONParser::parse</a></div><div class="ttdeci">JSONNode * parse()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00005">Parser.cpp:5</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_acccb70f3b476f4bf15ac2ab4fc6b2389"><div class="ttname"><a href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">JSONParser::parseObject</a></div><div class="ttdeci">JSONNode * parseObject()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00046">Parser.cpp:46</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_afc1f8f30a01440eae32445b153d6e572"><div class="ttname"><a href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">JSONParser::parseBoolean</a></div><div class="ttdeci">JSONNode * parseBoolean()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00189">Parser.cpp:189</a></div></div> |
|||
<div class="ttc" id="aclassTokenizer_html_a49db8c86447ad2cb543b5b1ea877f34d"><div class="ttname"><a href="classTokenizer.html#a49db8c86447ad2cb543b5b1ea877f34d">Tokenizer::rollBackToken</a></div><div class="ttdeci">void rollBackToken()</div><div class="ttdef"><b>Definition:</b> <a href="Token_8cpp_source.html#l00026">Token.cpp:26</a></div></div> |
|||
<div class="ttc" id="aclassTokenizer_html_ace80ed64add3ef2d0ee9f659a182d935"><div class="ttname"><a href="classTokenizer.html#ace80ed64add3ef2d0ee9f659a182d935">Tokenizer::hasMoreTokens</a></div><div class="ttdeci">bool hasMoreTokens()</div><div class="ttdef"><b>Definition:</b> <a href="Token_8cpp_source.html#l00009">Token.cpp:9</a></div></div> |
|||
<div class="ttc" id="aclassTokenizer_html_ad1c7c0a8f85fe189acefe26b857b7375"><div class="ttname"><a href="classTokenizer.html#ad1c7c0a8f85fe189acefe26b857b7375">Tokenizer::getToken</a></div><div class="ttdeci">Token getToken()</div><div class="ttdef"><b>Definition:</b> <a href="Token_8cpp_source.html#l00031">Token.cpp:31</a></div></div> |
|||
<div class="ttc" id="astructToken__s_html"><div class="ttname"><a href="structToken__s.html">Token_s</a></div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00017">Token.hpp:17</a></div></div> |
|||
<div class="ttc" id="astructToken__s_html_a587f8b8850febdfcda82cbf8333940a4"><div class="ttname"><a href="structToken__s.html#a587f8b8850febdfcda82cbf8333940a4">Token_s::value</a></div><div class="ttdeci">string value</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00018">Token.hpp:18</a></div></div> |
|||
<div class="ttc" id="astructToken__s_html_aaa3b698f6684c40c5b07dbbcd5dc99de"><div class="ttname"><a href="structToken__s.html#aaa3b698f6684c40c5b07dbbcd5dc99de">Token_s::type</a></div><div class="ttdeci">TOKEN type</div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00019">Token.hpp:19</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_ad72dbcf6d0153db1b8d8a58001feed83"><div class="ttname"><a href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a></div><div class="ttdeci">#define DEBUG</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00002">webserv.hpp:2</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_adfa52a9e5ae79ca0eff47012a29449e3"><div class="ttname"><a href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a></div><div class="ttdeci">std::map< string, JSONNode * > JSONObject</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00048">webserv.hpp:48</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Parser.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Parser.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Parser.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Parser_8hpp__incl.png" border="0" usemap="#aincludes_2Parser_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Parser_8hpp" id="aincludes_2Parser_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="2945,152,3033,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3057,152,3147,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3172,152,3245,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Parser_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Parser_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Parser_8hppdep" id="aincludes_2Parser_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="507,152,656,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Parser_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classJSONParser.html">JSONParser</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Parser_8hpp = |
|||
[ |
|||
[ "JSONParser", "classJSONParser.html", "classJSONParser" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Parser.hpp" name="includes/Parser.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" id="node3" href="$Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" id="node4" href="$Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" id="node5" href="$Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" id="node6" href="$Nodes_8hpp.html" title=" " alt="" coords="507,152,656,177"/> |
|||
<area shape="rect" id="node7" href="$Route_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
ee51d4de722b7901bf3ef8f00548f4c9 |
After Width: | Height: | Size: 70 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Parser.hpp" name="includes/Parser.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Route_8hpp.html" title=" " alt="" coords="2945,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Server_8hpp.html" title=" " alt="" coords="3057,152,3147,177"/> |
|||
<area shape="rect" id="node34" href="$Env_8hpp.html" title=" " alt="" coords="3172,152,3245,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
62c72d25e0e0ca1acd7d4ee912c1eb7b |
After Width: | Height: | Size: 104 KiB |
@ -0,0 +1,115 @@ |
|||
<!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: includes/Parser.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Parser.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Parser_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classJSONParser.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classJSONParser.html">JSONParser</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"><a class="line" href="classJSONParser.html#a1089fd3496dc6865d0137daec6310905"> 5</a></span> std::fstream <a class="code hl_variable" href="classJSONParser.html#a1089fd3496dc6865d0137daec6310905">file</a>;</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc"> 6</a></span> <a class="code hl_class" href="classTokenizer.html">Tokenizer</a> <a class="code hl_variable" href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">tokenizer</a>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> <a class="code hl_class" href="classJSONParser.html">JSONParser</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> filename);</div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#ac397e1ef199b5cd553c1dece740a045e">parse</a>();</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">parseObject</a>();</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">parseList</a>();</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">parseString</a>();</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">parseNumber</a>();</div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">parseBoolean</a>();</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *<a class="code hl_function" href="classJSONParser.html#a914758f808caf1443960df96d98810cc">parseNull</a>();</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>};</div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html"><div class="ttname"><a href="classJSONParser.html">JSONParser</a></div><div class="ttdef"><b>Definition:</b> <a href="Parser_8hpp_source.html#l00004">Parser.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a0ef04e64c276d2f24d02689ce1c101bc"><div class="ttname"><a href="classJSONParser.html#a0ef04e64c276d2f24d02689ce1c101bc">JSONParser::tokenizer</a></div><div class="ttdeci">Tokenizer tokenizer</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8hpp_source.html#l00006">Parser.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a1089fd3496dc6865d0137daec6310905"><div class="ttname"><a href="classJSONParser.html#a1089fd3496dc6865d0137daec6310905">JSONParser::file</a></div><div class="ttdeci">std::fstream file</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8hpp_source.html#l00005">Parser.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a1ca29ba38533304c6601eafd249d9ed4"><div class="ttname"><a href="classJSONParser.html#a1ca29ba38533304c6601eafd249d9ed4">JSONParser::parseString</a></div><div class="ttdeci">JSONNode * parseString()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00174">Parser.cpp:174</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a2d1a9d64e8bedc107cb5c9e7c4143fdf"><div class="ttname"><a href="classJSONParser.html#a2d1a9d64e8bedc107cb5c9e7c4143fdf">JSONParser::parseNumber</a></div><div class="ttdeci">JSONNode * parseNumber()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00181">Parser.cpp:181</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a7d5a3239976c55ca83d974c886146f88"><div class="ttname"><a href="classJSONParser.html#a7d5a3239976c55ca83d974c886146f88">JSONParser::parseList</a></div><div class="ttdeci">JSONNode * parseList()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00111">Parser.cpp:111</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_a914758f808caf1443960df96d98810cc"><div class="ttname"><a href="classJSONParser.html#a914758f808caf1443960df96d98810cc">JSONParser::parseNull</a></div><div class="ttdeci">JSONNode * parseNull()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00195">Parser.cpp:195</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_ac397e1ef199b5cd553c1dece740a045e"><div class="ttname"><a href="classJSONParser.html#ac397e1ef199b5cd553c1dece740a045e">JSONParser::parse</a></div><div class="ttdeci">JSONNode * parse()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00005">Parser.cpp:5</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_acccb70f3b476f4bf15ac2ab4fc6b2389"><div class="ttname"><a href="classJSONParser.html#acccb70f3b476f4bf15ac2ab4fc6b2389">JSONParser::parseObject</a></div><div class="ttdeci">JSONNode * parseObject()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00046">Parser.cpp:46</a></div></div> |
|||
<div class="ttc" id="aclassJSONParser_html_afc1f8f30a01440eae32445b153d6e572"><div class="ttname"><a href="classJSONParser.html#afc1f8f30a01440eae32445b153d6e572">JSONParser::parseBoolean</a></div><div class="ttdeci">JSONNode * parseBoolean()</div><div class="ttdef"><b>Definition:</b> <a href="Parser_8cpp_source.html#l00189">Parser.cpp:189</a></div></div> |
|||
<div class="ttc" id="aclassTokenizer_html"><div class="ttname"><a href="classTokenizer.html">Tokenizer</a></div><div class="ttdef"><b>Definition:</b> <a href="Token_8hpp_source.html#l00022">Token.hpp:22</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,81 @@ |
|||
<!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: README.md File 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&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&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="headertitle"><div class="title">README.md File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,140 @@ |
|||
<!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: srcs/load/Route.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Route.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
|
|||
<p>A location class which handle. |
|||
<a href="#details">More...</a></p> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Route.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Route_8cpp__incl.png" border="0" usemap="#asrcs_2load_2Route_8cpp" alt=""/></div> |
|||
<map name="asrcs_2load_2Route_8cpp" id="asrcs_2load_2Route_8cpp"> |
|||
<area shape="rect" title="A location class which handle." alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Route_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
|||
<div class="textblock"><p>A location class which handle. </p> |
|||
<dl class="section author"><dt>Author</dt><dd>Narnaud </dd></dl> |
|||
<dl class="section version"><dt>Version</dt><dd>0.1 </dd></dl> |
|||
<dl class="section date"><dt>Date</dt><dd>2023-01-12 </dd></dl> |
|||
|
|||
<p class="definition">Definition in file <a class="el" href="Route_8cpp_source.html">Route.cpp</a>.</p> |
|||
</div></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/load/Route.cpp" name="srcs/load/Route.cpp"> |
|||
<area shape="rect" id="node1" title="A location class which handle." alt="" coords="2007,5,2157,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
dd23136dc9d64da6e1073b534c9a9be5 |
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,215 @@ |
|||
<!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: srcs/load/Route.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Route.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Route_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classRoute.html#a3e7545442240c05dc562e2c9254c27ba"> 20</a></span><a class="code hl_function" href="classRoute.html#a3e7545442240c05dc562e2c9254c27ba">Route::Route</a>(<a class="code hl_class" href="classServer.html">Server</a> *server, <span class="keywordtype">string</span> location, <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *datas) : _server(server), _location(location) {</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> <span class="keywordtype">object</span> = datas-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>();</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *tmp;</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <a class="code hl_variable" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">_autoindex</a> = <span class="keyword">false</span>;</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a> = -1;</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"root"</span>]))</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_variable" href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">_root</a> = tmp-><a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>();</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"return"</span>]))</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_variable" href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">_ret</a> = tmp-><a class="code hl_function" href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">str</a>();</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"autoindex"</span>]))</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_variable" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">_autoindex</a> = tmp-><a class="code hl_function" href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">boo</a>();</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"indexs"</span>])) {</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> indexs = tmp-><a class="code hl_function" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">lst</a>();</div> |
|||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">for</span> (JSONList::iterator it = indexs.begin(); it < indexs.end(); it++)</div> |
|||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_variable" href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">_indexs</a>.push_back((*it)->str());</div> |
|||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> }</div> |
|||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"allowed_methods"</span>])) {</div> |
|||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> headers = tmp-><a class="code hl_function" href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">lst</a>();</div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">for</span> (JSONList::iterator it = headers.begin(); it < headers.end(); it++)</div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_variable" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">_allowed_methods</a>.push_back((*it)->str());</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> }</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"cgi"</span>])) {</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> cgis = tmp-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>();</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">for</span> (JSONObject::iterator it = cgis.begin(); it != cgis.end(); it++)</div> |
|||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>[(*it).first] = (*it).second->str();</div> |
|||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div> |
|||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">if</span> ((tmp = <span class="keywordtype">object</span>[<span class="stringliteral">"client_max_body_size"</span>]))</div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a> = tmp-><a class="code hl_function" href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">nbr</a>();</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div> |
|||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div> |
|||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f"> 51</a></span><a class="code hl_function" href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f">Route::~Route</a>(<span class="keywordtype">void</span>) {}</div> |
|||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div> |
|||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">// Getters</span></div> |
|||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb"> 54</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb">Route::getLocation</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">_location</a>; }</div> |
|||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf"> 55</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">Route::getRoot</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">_root</a>; }</div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef"> 56</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef">Route::getReturn</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">_ret</a>; }</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810"> 66</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">Route::getIndex</a>(<span class="keywordtype">string</span> uri, <span class="keywordtype">string</span> path) {</div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> std::stringstream body, ret;</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> DIR *dir;</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">struct </span>dirent *entry;</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">struct </span>stat info;</div> |
|||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> vec_string::iterator it;</div> |
|||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div> |
|||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">if</span> ((dir = opendir(path.c_str()))) {</div> |
|||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> cout << <span class="stringliteral">"get index(): path="</span> << path << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> body << <span class="stringliteral">"<h3 style=\"text-align: center;\">"</span> << path << <span class="stringliteral">" files :</h3>\n<ul>\n"</span>;</div> |
|||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">while</span> ((entry = readdir(dir)) != NULL) {</div> |
|||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordflow">if</span> (entry->d_name[0] == <span class="charliteral">'.'</span>)</div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">continue</span>;</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">for</span> (it = <a class="code hl_variable" href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">_indexs</a>.begin(); it < <a class="code hl_variable" href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">_indexs</a>.end(); it++) {</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">if</span> (entry->d_name == *it)</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">return</span> (<a class="code hl_function" href="tools_8cpp.html#a044b9a41ee6f56019e039d36e91dc265">read_file</a>(path + <span class="stringliteral">"/"</span> + *it));</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> body << <span class="stringliteral">"<li><a href=\""</span> << uri + <span class="stringliteral">"/"</span> + entry->d_name << <span class="stringliteral">"\">"</span> << entry->d_name << <span class="stringliteral">"</a></li>\n"</span>;</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (stat(path.c_str(), &info) != 0)</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> std::cerr << <span class="stringliteral">"stat() error on "</span> << path << <span class="stringliteral">": "</span> << strerror(errno) << <span class="stringliteral">"\n"</span>;</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> }</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> body << <span class="stringliteral">"</ul>"</span>;</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> closedir(dir);</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">if</span> (!dir || !<a class="code hl_variable" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">_autoindex</a>)</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (<a class="code hl_define" href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a>)</div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> cout << <span class="stringliteral">"Getting autoindex\n"</span>;</div> |
|||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> ret << <span class="stringliteral">"Content-type: text/html \r\n"</span>;</div> |
|||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> ret << <span class="stringliteral">"Content-length: "</span> << body.str().length() << <span class="stringliteral">"\r\n"</span>;</div> |
|||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> ret << <span class="stringliteral">"\r\n"</span> << body.str();</div> |
|||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">return</span> ret.str();</div> |
|||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span>}</div> |
|||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment">/* |==========|</span></div> |
|||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> * Correct the uri the client asked</span></div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> *</span></div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"> * Input: The uri</span></div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> * Output: The local path corresponding to that uri in the route</span></div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> */</span></div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div> |
|||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="classRoute.html#a5826254afb1e57c980c4b671bea8370a"> 115</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#a5826254afb1e57c980c4b671bea8370a">Route::correctUri</a>(<span class="keywordtype">string</span> uri) {</div> |
|||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> std::stringstream ret;</div> |
|||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> vec_string::iterator loc_word, uri_word;</div> |
|||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div> |
|||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> loc_words = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(<a class="code hl_variable" href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">_location</a>, <span class="stringliteral">"/"</span>);</div> |
|||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> uri_words = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(uri, <span class="stringliteral">"/"</span>);</div> |
|||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> uri_word = uri_words.begin();</div> |
|||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">for</span> (loc_word = loc_words.begin(); loc_word < loc_words.end(); loc_word++) {</div> |
|||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">while</span> (uri_word < uri_words.end() && *uri_word == <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> uri_word++;</div> |
|||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">while</span> (loc_word < loc_words.end() && *loc_word == <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> loc_word++;</div> |
|||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (loc_word != loc_words.end())</div> |
|||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> uri_word++;</div> |
|||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div> |
|||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> ret << <span class="stringliteral">"./"</span> << <a class="code hl_variable" href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">_root</a>;</div> |
|||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">while</span> (uri_word < uri_words.end())</div> |
|||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> ret << <span class="stringliteral">"/"</span> << *(uri_word++);</div> |
|||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordflow">return</span> ret.str();</div> |
|||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>}</div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a3c65ea4af29daa3869273af827ebe43c"><div class="ttname"><a href="classJSONNode.html#a3c65ea4af29daa3869273af827ebe43c">JSONNode::nbr</a></div><div class="ttdeci">int nbr()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00018">Nodes.cpp:18</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a6412ecbb284cfddb5de9818b72c785f9"><div class="ttname"><a href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a></div><div class="ttdeci">JSONObject obj()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00003">Nodes.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_ac6290ea016718b625b5a60ce176c75b8"><div class="ttname"><a href="classJSONNode.html#ac6290ea016718b625b5a60ce176c75b8">JSONNode::lst</a></div><div class="ttdeci">JSONList lst()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00008">Nodes.cpp:8</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_acc698e882b650c5679469ccd376b39db"><div class="ttname"><a href="classJSONNode.html#acc698e882b650c5679469ccd376b39db">JSONNode::str</a></div><div class="ttdeci">string str()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00013">Nodes.cpp:13</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_aed3bd34b9670b2e14dc2a3d08cb19d89"><div class="ttname"><a href="classJSONNode.html#aed3bd34b9670b2e14dc2a3d08cb19d89">JSONNode::boo</a></div><div class="ttdeci">bool boo()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00023">Nodes.cpp:23</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a1688ba652b72bb3a1a0055e7e9cd3e41"><div class="ttname"><a href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">Route::_cgi</a></div><div class="ttdeci">std::map< string, string > _cgi</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00012">Route.hpp:12</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a3096f41064cf24c0c884d4c26f2fa07f"><div class="ttname"><a href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">Route::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00011">Route.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a3e7545442240c05dc562e2c9254c27ba"><div class="ttname"><a href="classRoute.html#a3e7545442240c05dc562e2c9254c27ba">Route::Route</a></div><div class="ttdeci">Route(Server *server, string location, JSONNode *datas)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00020">Route.cpp:20</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a554deee37019d76b96a3411301b1d380"><div class="ttname"><a href="classRoute.html#a554deee37019d76b96a3411301b1d380">Route::_client_max_body_size</a></div><div class="ttdeci">int _client_max_body_size</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00013">Route.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a56499c8c2520297a62e2a117475e9e7c"><div class="ttname"><a href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">Route::_root</a></div><div class="ttdeci">string _root</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a5826254afb1e57c980c4b671bea8370a"><div class="ttname"><a href="classRoute.html#a5826254afb1e57c980c4b671bea8370a">Route::correctUri</a></div><div class="ttdeci">string correctUri(string uri)</div><div class="ttdoc">Find the local path corresponding to the uri asked by te client.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00115">Route.cpp:115</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a59d3fd535c995846b0d81b69d9b268f1"><div class="ttname"><a href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">Route::_indexs</a></div><div class="ttdeci">vec_string _indexs</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00011">Route.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a6c8cb0aaef581d3c14fff8ad99b3894f"><div class="ttname"><a href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f">Route::~Route</a></div><div class="ttdeci">~Route(void)</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00051">Route.cpp:51</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a7e6bd355bcfd1c4110d300649291b58a"><div class="ttname"><a href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">Route::_location</a></div><div class="ttdeci">string _location</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a888d6e2bc84b59421e9909e075a6e8bb"><div class="ttname"><a href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb">Route::getLocation</a></div><div class="ttdeci">string getLocation(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00054">Route.cpp:54</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a9b02eecb856d31da63cd1cd84600c43a"><div class="ttname"><a href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">Route::_autoindex</a></div><div class="ttdeci">bool _autoindex</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00008">Route.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_aa71b39273ba7bc2f683f40a6573ff810"><div class="ttname"><a href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">Route::getIndex</a></div><div class="ttdeci">string getIndex(string uri, string path)</div><div class="ttdoc">Search for an index while generating autoindex.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00066">Route.cpp:66</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_ac3f11aed02ce019d0d556230b119d217"><div class="ttname"><a href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">Route::_ret</a></div><div class="ttdeci">string _ret</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_af9b27a012c16f0105b7c5caf25e033ef"><div class="ttname"><a href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef">Route::getReturn</a></div><div class="ttdeci">string getReturn(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00056">Route.cpp:56</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_afd1fe00a85e85ac4964f618f8f2d7bdf"><div class="ttname"><a href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">Route::getRoot</a></div><div class="ttdeci">string getRoot(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00055">Route.cpp:55</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a044b9a41ee6f56019e039d36e91dc265"><div class="ttname"><a href="tools_8cpp.html#a044b9a41ee6f56019e039d36e91dc265">read_file</a></div><div class="ttdeci">string read_file(string path)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00058">tools.cpp:58</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a4a79e98b5dec14d16875307f7e77dfb3"><div class="ttname"><a href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a></div><div class="ttdeci">vec_string split(string str, string delim)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00020">tools.cpp:20</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_ad72dbcf6d0153db1b8d8a58001feed83"><div class="ttname"><a href="webserv_8hpp.html#ad72dbcf6d0153db1b8d8a58001feed83">DEBUG</a></div><div class="ttdeci">#define DEBUG</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00002">webserv.hpp:2</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_adfa52a9e5ae79ca0eff47012a29449e3"><div class="ttname"><a href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a></div><div class="ttdeci">std::map< string, JSONNode * > JSONObject</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00048">webserv.hpp:48</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Route.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Route.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Route.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Route_8hpp__incl.png" border="0" usemap="#aincludes_2Route_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Route_8hpp" id="aincludes_2Route_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3058,152,3149,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3173,152,3247,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Route_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Route_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Route_8hppdep" id="aincludes_2Route_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="507,152,656,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Route_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classRoute.html">Route</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Route_8hpp = |
|||
[ |
|||
[ "Route", "classRoute.html", "classRoute" ] |
|||
]; |
@ -0,0 +1,22 @@ |
|||
<map id="includes/Route.hpp" name="includes/Route.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1024,5,1171,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1016,79,1179,104"/> |
|||
<area shape="rect" id="node3" href="$Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" id="node4" href="$Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" id="node5" href="$Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" id="node6" href="$Nodes_8hpp.html" title=" " alt="" coords="507,152,656,177"/> |
|||
<area shape="rect" id="node7" href="$Parser_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" id="node8" href="$Server_8hpp.html" title=" " alt="" coords="851,152,1000,177"/> |
|||
<area shape="rect" id="node9" href="$Token_8hpp.html" title=" " alt="" coords="1025,152,1170,177"/> |
|||
<area shape="rect" id="node10" href="$debug_8cpp.html" title=" " alt="" coords="1194,152,1313,177"/> |
|||
<area shape="rect" id="node11" href="$Nodes_8cpp.html" title=" " alt="" coords="1337,152,1487,177"/> |
|||
<area shape="rect" id="node12" href="$Parser_8cpp.html" title=" " alt="" coords="1512,152,1661,177"/> |
|||
<area shape="rect" id="node13" href="$Token_8cpp.html" title=" " alt="" coords="1685,152,1832,177"/> |
|||
<area shape="rect" id="node14" href="$Env_8cpp.html" title=" " alt="" coords="1857,152,1991,177"/> |
|||
<area shape="rect" id="node15" href="$Route_8cpp.html" title="A location class which handle." alt="" coords="2016,152,2165,177"/> |
|||
<area shape="rect" id="node16" href="$Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2189,152,2341,177"/> |
|||
<area shape="rect" id="node17" href="$Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2366,152,2517,177"/> |
|||
<area shape="rect" id="node18" href="$Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2541,152,2699,177"/> |
|||
<area shape="rect" id="node19" href="$tools_8cpp.html" title=" " alt="" coords="2723,152,2834,177"/> |
|||
<area shape="rect" id="node20" href="$webserv_8cpp.html" title="A http server written in c++." alt="" coords="2859,152,2992,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
cf53787ce5268fb184ce7b63ce3fca82 |
After Width: | Height: | Size: 70 KiB |
@ -0,0 +1,36 @@ |
|||
<map id="includes/Route.hpp" name="includes/Route.hpp"> |
|||
<area shape="rect" id="node1" title=" " alt="" coords="1909,5,2055,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Server_8hpp.html" title=" " alt="" coords="3058,152,3149,177"/> |
|||
<area shape="rect" id="node34" href="$Env_8hpp.html" title=" " alt="" coords="3173,152,3247,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
fe209474ec222645e1e5300dea261244 |
After Width: | Height: | Size: 105 KiB |
@ -0,0 +1,129 @@ |
|||
<!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: includes/Route.hpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Route.hpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Route_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div> |
|||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div> |
|||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"><a class="line" href="classRoute.html"> 4</a></span><span class="keyword">class </span><a class="code hl_class" href="classRoute.html">Route</a> {</div> |
|||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="keyword">protected</span>:</div> |
|||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"><a class="line" href="classRoute.html#a0265e667aad49b2e6e3ca040ba7c8e06"> 6</a></span> <a class="code hl_class" href="classServer.html">Server</a> *<a class="code hl_variable" href="classRoute.html#a0265e667aad49b2e6e3ca040ba7c8e06">_server</a>;</div> |
|||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"><a class="line" href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a"> 7</a></span> <span class="keywordtype">string</span> <a class="code hl_variable" href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">_location</a>, <a class="code hl_variable" href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">_root</a>, <a class="code hl_variable" href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">_ret</a>;</div> |
|||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a"> 8</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">_autoindex</a>;</div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">public</span>:</div> |
|||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f"> 11</a></span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> <a class="code hl_variable" href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">_indexs</a>, <a class="code hl_variable" href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">_allowed_methods</a>;</div> |
|||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41"> 12</a></span> std::map<string, string> <a class="code hl_variable" href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">_cgi</a>;</div> |
|||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="classRoute.html#a554deee37019d76b96a3411301b1d380"> 13</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classRoute.html#a554deee37019d76b96a3411301b1d380">_client_max_body_size</a>;</div> |
|||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div> |
|||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <a class="code hl_class" href="classRoute.html">Route</a>(<a class="code hl_class" href="classServer.html">Server</a> *server, <span class="keywordtype">string</span> location, <a class="code hl_class" href="classJSONNode.html">JSONNode</a> *datas);</div> |
|||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <a class="code hl_function" href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f">~Route</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb">getLocation</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">getRoot</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef">getReturn</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classRoute.html#af25f589b6b764829c3c98fcd952bf8ae"> 20</a></span> <a class="code hl_class" href="classServer.html">Server</a> *<a class="code hl_function" href="classRoute.html#af25f589b6b764829c3c98fcd952bf8ae">getServer</a>(<span class="keywordtype">void</span>);</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">getIndex</a>(<span class="keywordtype">string</span> uri, <span class="keywordtype">string</span> path);</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordtype">string</span> <a class="code hl_function" href="classRoute.html#a5826254afb1e57c980c4b671bea8370a">correctUri</a>(<span class="keywordtype">string</span> uri);</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>};</div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html"><div class="ttname"><a href="classRoute.html">Route</a></div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00004">Route.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a0265e667aad49b2e6e3ca040ba7c8e06"><div class="ttname"><a href="classRoute.html#a0265e667aad49b2e6e3ca040ba7c8e06">Route::_server</a></div><div class="ttdeci">Server * _server</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00006">Route.hpp:6</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a1688ba652b72bb3a1a0055e7e9cd3e41"><div class="ttname"><a href="classRoute.html#a1688ba652b72bb3a1a0055e7e9cd3e41">Route::_cgi</a></div><div class="ttdeci">std::map< string, string > _cgi</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00012">Route.hpp:12</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a3096f41064cf24c0c884d4c26f2fa07f"><div class="ttname"><a href="classRoute.html#a3096f41064cf24c0c884d4c26f2fa07f">Route::_allowed_methods</a></div><div class="ttdeci">vec_string _allowed_methods</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00011">Route.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a554deee37019d76b96a3411301b1d380"><div class="ttname"><a href="classRoute.html#a554deee37019d76b96a3411301b1d380">Route::_client_max_body_size</a></div><div class="ttdeci">int _client_max_body_size</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00013">Route.hpp:13</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a56499c8c2520297a62e2a117475e9e7c"><div class="ttname"><a href="classRoute.html#a56499c8c2520297a62e2a117475e9e7c">Route::_root</a></div><div class="ttdeci">string _root</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a5826254afb1e57c980c4b671bea8370a"><div class="ttname"><a href="classRoute.html#a5826254afb1e57c980c4b671bea8370a">Route::correctUri</a></div><div class="ttdeci">string correctUri(string uri)</div><div class="ttdoc">Find the local path corresponding to the uri asked by te client.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00115">Route.cpp:115</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a59d3fd535c995846b0d81b69d9b268f1"><div class="ttname"><a href="classRoute.html#a59d3fd535c995846b0d81b69d9b268f1">Route::_indexs</a></div><div class="ttdeci">vec_string _indexs</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00011">Route.hpp:11</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a6c8cb0aaef581d3c14fff8ad99b3894f"><div class="ttname"><a href="classRoute.html#a6c8cb0aaef581d3c14fff8ad99b3894f">Route::~Route</a></div><div class="ttdeci">~Route(void)</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00051">Route.cpp:51</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a7e6bd355bcfd1c4110d300649291b58a"><div class="ttname"><a href="classRoute.html#a7e6bd355bcfd1c4110d300649291b58a">Route::_location</a></div><div class="ttdeci">string _location</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a888d6e2bc84b59421e9909e075a6e8bb"><div class="ttname"><a href="classRoute.html#a888d6e2bc84b59421e9909e075a6e8bb">Route::getLocation</a></div><div class="ttdeci">string getLocation(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00054">Route.cpp:54</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_a9b02eecb856d31da63cd1cd84600c43a"><div class="ttname"><a href="classRoute.html#a9b02eecb856d31da63cd1cd84600c43a">Route::_autoindex</a></div><div class="ttdeci">bool _autoindex</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00008">Route.hpp:8</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_aa71b39273ba7bc2f683f40a6573ff810"><div class="ttname"><a href="classRoute.html#aa71b39273ba7bc2f683f40a6573ff810">Route::getIndex</a></div><div class="ttdeci">string getIndex(string uri, string path)</div><div class="ttdoc">Search for an index while generating autoindex.</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00066">Route.cpp:66</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_ac3f11aed02ce019d0d556230b119d217"><div class="ttname"><a href="classRoute.html#ac3f11aed02ce019d0d556230b119d217">Route::_ret</a></div><div class="ttdeci">string _ret</div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00007">Route.hpp:7</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_af25f589b6b764829c3c98fcd952bf8ae"><div class="ttname"><a href="classRoute.html#af25f589b6b764829c3c98fcd952bf8ae">Route::getServer</a></div><div class="ttdeci">Server * getServer(void)</div></div> |
|||
<div class="ttc" id="aclassRoute_html_af9b27a012c16f0105b7c5caf25e033ef"><div class="ttname"><a href="classRoute.html#af9b27a012c16f0105b7c5caf25e033ef">Route::getReturn</a></div><div class="ttdeci">string getReturn(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00056">Route.cpp:56</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html_afd1fe00a85e85ac4964f618f8f2d7bdf"><div class="ttname"><a href="classRoute.html#afd1fe00a85e85ac4964f618f8f2d7bdf">Route::getRoot</a></div><div class="ttdeci">string getRoot(void)</div><div class="ttdef"><b>Definition:</b> <a href="Route_8cpp_source.html#l00055">Route.cpp:55</a></div></div> |
|||
<div class="ttc" id="aclassServer_html"><div class="ttname"><a href="classServer.html">Server</a></div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00004">Server.hpp:4</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,140 @@ |
|||
<!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: srcs/load/Server.cpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Server.cpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
|
|||
<p>The servers object. One is created for each config server. |
|||
<a href="#details">More...</a></p> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Server.cpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Server_8cpp__incl.png" border="0" usemap="#asrcs_2load_2Server_8cpp" alt=""/></div> |
|||
<map name="asrcs_2load_2Server_8cpp" id="asrcs_2load_2Server_8cpp"> |
|||
<area shape="rect" title="The servers object. One is created for each config server." alt="" coords="2006,5,2158,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Server_8cpp_source.html">Go to the source code of this file.</a></p> |
|||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
|||
<div class="textblock"><p>The servers object. One is created for each config server. </p> |
|||
<dl class="section author"><dt>Author</dt><dd>Narnaud </dd></dl> |
|||
<dl class="section version"><dt>Version</dt><dd>0.1 </dd></dl> |
|||
<dl class="section date"><dt>Date</dt><dd>2023-01-12 </dd></dl> |
|||
|
|||
<p class="definition">Definition in file <a class="el" href="Server_8cpp_source.html">Server.cpp</a>.</p> |
|||
</div></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,37 @@ |
|||
<map id="srcs/load/Server.cpp" name="srcs/load/Server.cpp"> |
|||
<area shape="rect" id="node1" title="The servers object. One is created for each config server." alt="" coords="2006,5,2158,31"/> |
|||
<area shape="rect" id="node2" href="$webserv_8hpp.html" title=" " alt="" coords="2030,79,2134,104"/> |
|||
<area shape="rect" id="node3" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" id="node4" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" id="node5" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" id="node6" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" id="node7" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" id="node8" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" id="node9" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" id="node10" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" id="node11" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" id="node12" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" id="node13" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" id="node14" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" id="node15" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" id="node16" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" id="node17" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" id="node18" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" id="node19" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" id="node20" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" id="node21" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" id="node22" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" id="node23" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" id="node24" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" id="node25" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" id="node26" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" id="node27" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" id="node28" href="$Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" id="node29" href="$Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" id="node30" href="$Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" id="node31" href="$Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" id="node32" href="$Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" id="node33" href="$Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" id="node34" href="$Server_8hpp.html" title=" " alt="" coords="3170,152,3261,177"/> |
|||
<area shape="rect" id="node35" href="$Env_8hpp.html" title=" " alt="" coords="3285,152,3359,177"/> |
|||
</map> |
@ -0,0 +1 @@ |
|||
93ddd1a32a4e39fa307b8c995f015c4a |
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,180 @@ |
|||
<!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: srcs/load/Server.cpp Source File</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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_b73b02d482d1c4a3db20c3d9ad52d395.html">srcs</a></li><li class="navelem"><a class="el" href="dir_5fca218e70541e091643ad2320ad7111.html">load</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="headertitle"><div class="title">Server.cpp</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<a href="Server_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div> |
|||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "<a class="code" href="webserv_8hpp.html">webserv.hpp</a>"</span></div> |
|||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div> |
|||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="classServer.html#aa7907c537140a174ab5096f7e25d9b40"> 20</a></span><a class="code hl_function" href="classServer.html#aa7907c537140a174ab5096f7e25d9b40">Server::Server</a>(<a class="code hl_class" href="classJSONNode.html">JSONNode</a> *server) : <a class="code hl_class" href="classRoute.html">Route</a>(NULL, <span class="stringliteral">"/"</span>, server) {</div> |
|||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> datas = server-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>();</div> |
|||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordflow">if</span> (datas[<span class="stringliteral">"server_name"</span>])</div> |
|||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <a class="code hl_variable" href="classServer.html#a95c77245a1a0a9fd09926fc8e9661ebe">_name</a> = datas[<span class="stringliteral">"server_name"</span>]->str();</div> |
|||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (datas[<span class="stringliteral">"locations"</span>]) {</div> |
|||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> locations = datas[<span class="stringliteral">"locations"</span>]->obj();</div> |
|||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">for</span> (JSONObject::iterator it = locations.begin(); it != locations.end(); it++) {</div> |
|||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <a class="code hl_class" href="classRoute.html">Route</a> *route = <span class="keyword">new</span> <a class="code hl_class" href="classRoute.html">Route</a>(<span class="keyword">this</span>, (*it).first, (*it).second);</div> |
|||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_variable" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a>[(*it).first] = route;</div> |
|||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div> |
|||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> }</div> |
|||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>}</div> |
|||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div> |
|||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="classServer.html#a803b89b673283131d2ae765c82923f8d"> 38</a></span><a class="code hl_function" href="classServer.html#a803b89b673283131d2ae765c82923f8d">Server::~Server</a>(<span class="keywordtype">void</span>) {</div> |
|||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">for</span> (std::map<string, Route *>::iterator it = <a class="code hl_variable" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a>.begin(); it != <a class="code hl_variable" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a>.end(); it++)</div> |
|||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">delete</span> (*it).second;</div> |
|||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> cout << <span class="stringliteral">"Server destroyed!\n"</span>;</div> |
|||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>}</div> |
|||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div> |
|||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classServer.html#ab957b5aafbabdc8f108cf68bfb5968c9"> 47</a></span><span class="keywordtype">string</span> <a class="code hl_function" href="classServer.html#ab957b5aafbabdc8f108cf68bfb5968c9">Server::getName</a>(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="classServer.html#a95c77245a1a0a9fd09926fc8e9661ebe">_name</a>; }</div> |
|||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div> |
|||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993"> 56</a></span><a class="code hl_class" href="classMaster.html">Master</a> *<a class="code hl_function" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993">Server::create_master</a>(<span class="keywordtype">string</span> str) {</div> |
|||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> listen = <a class="code hl_function" href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358">get_ip_port_t</a>(str);</div> |
|||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">if</span> (listen.<a class="code hl_variable" href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip</a>.at(0) != <span class="charliteral">'['</span>) {</div> |
|||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">try</span> {</div> |
|||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <a class="code hl_variable" href="classServer.html#a6fecdbd597c344d2ae004ff72fdbef74">_listens</a>.push_back(listen);</div> |
|||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <a class="code hl_class" href="classMaster.html">Master</a> *sock = <span class="keyword">new</span> <a class="code hl_class" href="classMaster.html">Master</a>(listen);</div> |
|||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">return</span> (sock);</div> |
|||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> } <span class="keywordflow">catch</span> (std::exception &e) {</div> |
|||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> std::cerr << e.what() << <span class="charliteral">'\n'</span>;</div> |
|||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div> |
|||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> } <span class="keywordflow">else</span></div> |
|||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> cout << <span class="stringliteral">"Listen: IPv6 isn't supported\n"</span>;</div> |
|||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> NULL;</div> |
|||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>}</div> |
|||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div> |
|||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classServer.html#a5738134631f6bab9a26ca0687d86f21f"> 79</a></span>std::vector<Master *> <a class="code hl_function" href="classServer.html#a5738134631f6bab9a26ca0687d86f21f">Server::get_sockets</a>(<a class="code hl_class" href="classJSONNode.html">JSONNode</a> *server) {</div> |
|||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_typedef" href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a> datas = server-><a class="code hl_function" href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">obj</a>();</div> |
|||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> std::vector<Master *> ret;</div> |
|||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <a class="code hl_class" href="classMaster.html">Master</a> *tmp;</div> |
|||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_struct" href="structip__port__s.html">ip_port_t</a> listen;</div> |
|||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">if</span> (datas[<span class="stringliteral">"listens"</span>]) {</div> |
|||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <a class="code hl_typedef" href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a> listens = datas[<span class="stringliteral">"listens"</span>]->lst();</div> |
|||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">for</span> (JSONList::iterator it = listens.begin(); it != listens.end(); it++) {</div> |
|||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">if</span> ((tmp = <a class="code hl_function" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993">create_master</a>((*it)->str())))</div> |
|||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> ret.push_back(tmp);</div> |
|||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div> |
|||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((tmp = <a class="code hl_function" href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993">create_master</a>(<span class="stringliteral">"0.0.0.0"</span>)))</div> |
|||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> ret.push_back(tmp);</div> |
|||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">return</span> ret;</div> |
|||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>}</div> |
|||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div> |
|||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9"> 102</a></span><a class="code hl_class" href="classRoute.html">Route</a> *<a class="code hl_function" href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9">Server::choose_route</a>(<span class="keywordtype">string</span> uri) {</div> |
|||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <a class="code hl_typedef" href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a> uri_words, loc_words;</div> |
|||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> uri_words = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>(uri, <span class="stringliteral">"/"</span>);</div> |
|||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">for</span> (std::map<string, Route *>::iterator loc_it = <a class="code hl_variable" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a>.begin(); loc_it != <a class="code hl_variable" href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">_routes</a>.end(); loc_it++) {</div> |
|||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> loc_words = <a class="code hl_function" href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a>((*loc_it).first, <span class="stringliteral">"/"</span>);</div> |
|||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> vec_string::iterator loc_word = loc_words.begin();</div> |
|||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">for</span> (vec_string::iterator uri_word = uri_words.begin(); uri_word < uri_words.end(); uri_word++) {</div> |
|||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">while</span> (uri_word != uri_words.end() && *uri_word == <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> uri_word++;</div> |
|||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">if</span> (*uri_word != *(loc_word++))</div> |
|||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">break</span>;</div> |
|||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">while</span> (loc_word != loc_words.end() && *loc_word == <span class="stringliteral">""</span>)</div> |
|||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> loc_word++;</div> |
|||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">if</span> (loc_word == loc_words.end())</div> |
|||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> ((*loc_it).second);</div> |
|||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div> |
|||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div> |
|||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> <span class="keyword">this</span>;</div> |
|||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span>}</div> |
|||
<div class="ttc" id="aclassJSONNode_html"><div class="ttname"><a href="classJSONNode.html">JSONNode</a></div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8hpp_source.html#l00004">Nodes.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassJSONNode_html_a6412ecbb284cfddb5de9818b72c785f9"><div class="ttname"><a href="classJSONNode.html#a6412ecbb284cfddb5de9818b72c785f9">JSONNode::obj</a></div><div class="ttdeci">JSONObject obj()</div><div class="ttdef"><b>Definition:</b> <a href="Nodes_8cpp_source.html#l00003">Nodes.cpp:3</a></div></div> |
|||
<div class="ttc" id="aclassMaster_html"><div class="ttname"><a href="classMaster.html">Master</a></div><div class="ttdef"><b>Definition:</b> <a href="Master_8hpp_source.html#l00004">Master.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassRoute_html"><div class="ttname"><a href="classRoute.html">Route</a></div><div class="ttdef"><b>Definition:</b> <a href="Route_8hpp_source.html#l00004">Route.hpp:4</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a0664c62a66a7e3e41d48c286c55a90a9"><div class="ttname"><a href="classServer.html#a0664c62a66a7e3e41d48c286c55a90a9">Server::choose_route</a></div><div class="ttdeci">Route * choose_route(string uri)</div><div class="ttdoc">Choose the route an uri asked to the server.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00102">Server.cpp:102</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a5738134631f6bab9a26ca0687d86f21f"><div class="ttname"><a href="classServer.html#a5738134631f6bab9a26ca0687d86f21f">Server::get_sockets</a></div><div class="ttdeci">std::vector< Master * > get_sockets(JSONNode *server)</div><div class="ttdoc">Create server's defined sockets:</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00079">Server.cpp:79</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a6c46d7b86956f508b1c0bfe125b03993"><div class="ttname"><a href="classServer.html#a6c46d7b86956f508b1c0bfe125b03993">Server::create_master</a></div><div class="ttdeci">Master * create_master(string str)</div><div class="ttdoc">Master socket safe creation.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00056">Server.cpp:56</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a6fecdbd597c344d2ae004ff72fdbef74"><div class="ttname"><a href="classServer.html#a6fecdbd597c344d2ae004ff72fdbef74">Server::_listens</a></div><div class="ttdeci">std::vector< ip_port_t > _listens</div><div class="ttdoc">The list of listens the server which are linked to the server.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00009">Server.hpp:9</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a803b89b673283131d2ae765c82923f8d"><div class="ttname"><a href="classServer.html#a803b89b673283131d2ae765c82923f8d">Server::~Server</a></div><div class="ttdeci">~Server(void)</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00038">Server.cpp:38</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_a95c77245a1a0a9fd09926fc8e9661ebe"><div class="ttname"><a href="classServer.html#a95c77245a1a0a9fd09926fc8e9661ebe">Server::_name</a></div><div class="ttdeci">string _name</div><div class="ttdoc">The server name.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00005">Server.hpp:5</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_aa7907c537140a174ab5096f7e25d9b40"><div class="ttname"><a href="classServer.html#aa7907c537140a174ab5096f7e25d9b40">Server::Server</a></div><div class="ttdeci">Server(JSONNode *server)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00020">Server.cpp:20</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_ab957b5aafbabdc8f108cf68bfb5968c9"><div class="ttname"><a href="classServer.html#ab957b5aafbabdc8f108cf68bfb5968c9">Server::getName</a></div><div class="ttdeci">string getName(void)</div><div class="ttdef"><b>Definition:</b> <a href="Server_8cpp_source.html#l00047">Server.cpp:47</a></div></div> |
|||
<div class="ttc" id="aclassServer_html_aebc8d22ef79e648de88441c37fb1db46"><div class="ttname"><a href="classServer.html#aebc8d22ef79e648de88441c37fb1db46">Server::_routes</a></div><div class="ttdeci">std::map< string, Route * > _routes</div><div class="ttdoc">The server's routings with a route object as object and his location as key.</div><div class="ttdef"><b>Definition:</b> <a href="Server_8hpp_source.html#l00006">Server.hpp:6</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html"><div class="ttname"><a href="structip__port__s.html">ip_port_s</a></div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00035">webserv.hpp:35</a></div></div> |
|||
<div class="ttc" id="astructip__port__s_html_afb20776a9723a50ac32fd9b8248b3e0c"><div class="ttname"><a href="structip__port__s.html#afb20776a9723a50ac32fd9b8248b3e0c">ip_port_s::ip</a></div><div class="ttdeci">string ip</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00037">webserv.hpp:37</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a4a79e98b5dec14d16875307f7e77dfb3"><div class="ttname"><a href="tools_8cpp.html#a4a79e98b5dec14d16875307f7e77dfb3">split</a></div><div class="ttdeci">vec_string split(string str, string delim)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00020">tools.cpp:20</a></div></div> |
|||
<div class="ttc" id="atools_8cpp_html_a6e7e23c21ae956b6859a6f3ec9793358"><div class="ttname"><a href="tools_8cpp.html#a6e7e23c21ae956b6859a6f3ec9793358">get_ip_port_t</a></div><div class="ttdeci">ip_port_t get_ip_port_t(string listen)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8cpp_source.html#l00035">tools.cpp:35</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html"><div class="ttname"><a href="webserv_8hpp.html">webserv.hpp</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aa3529ef9abc60facb73497ed5062d913"><div class="ttname"><a href="webserv_8hpp.html#aa3529ef9abc60facb73497ed5062d913">JSONList</a></div><div class="ttdeci">std::vector< JSONNode * > JSONList</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00049">webserv.hpp:49</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_aba96a6988a5bc02b5c8b908af07d0bbb"><div class="ttname"><a href="webserv_8hpp.html#aba96a6988a5bc02b5c8b908af07d0bbb">vec_string</a></div><div class="ttdeci">std::vector< string > vec_string</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00050">webserv.hpp:50</a></div></div> |
|||
<div class="ttc" id="awebserv_8hpp_html_adfa52a9e5ae79ca0eff47012a29449e3"><div class="ttname"><a href="webserv_8hpp.html#adfa52a9e5ae79ca0eff47012a29449e3">JSONObject</a></div><div class="ttdeci">std::map< string, JSONNode * > JSONObject</div><div class="ttdef"><b>Definition:</b> <a href="webserv_8hpp_source.html#l00048">webserv.hpp:48</a></div></div> |
|||
</div><!-- fragment --></div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,164 @@ |
|||
<!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: includes/Server.hpp File 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&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&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 id="nav-path" class="navpath"> |
|||
<ul> |
|||
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li> </ul> |
|||
</div> |
|||
</div><!-- top --> |
|||
<div class="header"> |
|||
<div class="summary"> |
|||
<a href="#nested-classes">Data Structures</a> </div> |
|||
<div class="headertitle"><div class="title">Server.hpp File Reference</div></div> |
|||
</div><!--header--> |
|||
<div class="contents"> |
|||
<div class="textblock"><code>#include "<a class="el" href="webserv_8hpp_source.html">webserv.hpp</a>"</code><br /> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
Include dependency graph for Server.hpp:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Server_8hpp__incl.png" border="0" usemap="#aincludes_2Server_8hpp" alt=""/></div> |
|||
<map name="aincludes_2Server_8hpp" id="aincludes_2Server_8hpp"> |
|||
<area shape="rect" title=" " alt="" coords="1907,5,2057,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1930,79,2034,104"/> |
|||
<area shape="rect" title=" " alt="" coords="5,152,97,177"/> |
|||
<area shape="rect" title=" " alt="" coords="122,152,194,177"/> |
|||
<area shape="rect" title=" " alt="" coords="219,152,281,177"/> |
|||
<area shape="rect" title=" " alt="" coords="306,152,402,177"/> |
|||
<area shape="rect" title=" " alt="" coords="427,152,529,177"/> |
|||
<area shape="rect" title=" " alt="" coords="554,152,639,177"/> |
|||
<area shape="rect" title=" " alt="" coords="663,152,754,177"/> |
|||
<area shape="rect" title=" " alt="" coords="778,152,874,177"/> |
|||
<area shape="rect" title=" " alt="" coords="898,152,986,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1010,152,1077,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1101,152,1175,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1199,152,1285,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1309,152,1375,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1399,152,1461,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1486,152,1553,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1577,152,1638,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1663,152,1728,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1753,152,1819,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1844,152,1917,177"/> |
|||
<area shape="rect" title=" " alt="" coords="1942,152,2022,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2047,152,2117,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2142,152,2217,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2241,152,2299,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2323,152,2374,177"/> |
|||
<area shape="rect" title=" " alt="" coords="2399,152,2461,177"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="2486,152,2574,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="2599,152,2693,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="2718,152,2809,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="2833,152,2920,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="2944,152,3033,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="3058,152,3146,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="3171,152,3244,177"/> |
|||
</map> |
|||
</div> |
|||
</div><div class="textblock"><div class="dynheader"> |
|||
This graph shows which files directly or indirectly include this file:</div> |
|||
<div class="dyncontent"> |
|||
<div class="center"><img src="Server_8hpp__dep__incl.png" border="0" usemap="#aincludes_2Server_8hppdep" alt=""/></div> |
|||
<map name="aincludes_2Server_8hppdep" id="aincludes_2Server_8hppdep"> |
|||
<area shape="rect" title=" " alt="" coords="1020,5,1169,31"/> |
|||
<area shape="rect" href="webserv_8hpp.html" title=" " alt="" coords="1013,79,1176,104"/> |
|||
<area shape="rect" href="Client_8hpp.html" title=" " alt="" coords="5,152,152,177"/> |
|||
<area shape="rect" href="Env_8hpp.html" title=" " alt="" coords="176,152,307,177"/> |
|||
<area shape="rect" href="Master_8hpp.html" title=" " alt="" coords="331,152,483,177"/> |
|||
<area shape="rect" href="Nodes_8hpp.html" title=" " alt="" coords="507,152,656,177"/> |
|||
<area shape="rect" href="Parser_8hpp.html" title=" " alt="" coords="680,152,827,177"/> |
|||
<area shape="rect" href="Route_8hpp.html" title=" " alt="" coords="851,152,997,177"/> |
|||
<area shape="rect" href="Token_8hpp.html" title=" " alt="" coords="1022,152,1167,177"/> |
|||
<area shape="rect" href="debug_8cpp.html" title=" " alt="" coords="1191,152,1310,177"/> |
|||
<area shape="rect" href="Nodes_8cpp.html" title=" " alt="" coords="1334,152,1485,177"/> |
|||
<area shape="rect" href="Parser_8cpp.html" title=" " alt="" coords="1509,152,1659,177"/> |
|||
<area shape="rect" href="Token_8cpp.html" title=" " alt="" coords="1683,152,1829,177"/> |
|||
<area shape="rect" href="Env_8cpp.html" title=" " alt="" coords="1854,152,1989,177"/> |
|||
<area shape="rect" href="Route_8cpp.html" title="A location class which handle." alt="" coords="2013,152,2163,177"/> |
|||
<area shape="rect" href="Server_8cpp.html" title="The servers object. One is created for each config server." alt="" coords="2187,152,2339,177"/> |
|||
<area shape="rect" href="Client_8cpp.html" title="The client sockets class which keep keep clients information and handle answer to them." alt="" coords="2363,152,2514,177"/> |
|||
<area shape="rect" href="Master_8cpp.html" title="The master sockets class which receive each incomming new client." alt="" coords="2539,152,2696,177"/> |
|||
<area shape="rect" href="tools_8cpp.html" title=" " alt="" coords="2721,152,2831,177"/> |
|||
<area shape="rect" href="webserv_8cpp.html" title="A http server written in c++." alt="" coords="2856,152,2989,177"/> |
|||
</map> |
|||
</div> |
|||
</div> |
|||
<p><a href="Server_8hpp_source.html">Go to the source code of this file.</a></p> |
|||
<table class="memberdecls"> |
|||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a> |
|||
Data Structures</h2></td></tr> |
|||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classServer.html">Server</a></td></tr> |
|||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
|||
</table> |
|||
</div><!-- contents --> |
|||
<!-- start footer part --> |
|||
<hr class="footer"/><address class="footer"><small> |
|||
Generated by <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> |
@ -0,0 +1,4 @@ |
|||
var Server_8hpp = |
|||
[ |
|||
[ "Server", "classServer.html", "classServer" ] |
|||
]; |