still working on integrating the config file stuff

This commit is contained in:
Me
2022-07-25 21:00:04 +02:00
parent b9ccf09089
commit 35ac55b5e8
9 changed files with 142 additions and 36 deletions

View File

@@ -18,6 +18,21 @@ Webserv::Webserv()
} */
Webserv::Webserv(std::vector<ServerConfig>* servers)
: _servers(servers)
{
// talk to luke about what all this does
// the Param Constructor might need to do dif stuff
std::cout << "Server init\n";
_epfd = ::epoll_create1(0); // (EPOLL_CLOEXEC) for CGI fork ?
if (_epfd == -1)
{
std::perror("err epoll_create1(): ");
throw std::runtime_error("Epoll init");
}
}
Webserv::~Webserv()
{
close(_socket_fd);