-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebserv.hpp
More file actions
50 lines (46 loc) · 1.9 KB
/
webserv.hpp
File metadata and controls
50 lines (46 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* webserv.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: moerradi <moerradi@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/22 15:30:27 by kdrissi- #+# #+# */
/* Updated: 2022/11/25 12:42:18 by moerradi ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <fstream>
#include <map>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <cerrno>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include "utils/utils.hpp"
#include "./configFileParser/Server.hpp"
#include "./configFileParser/Location.hpp"
#include "TcpListener/TcpListener.hpp"
#include "TcpListener/Webserv.hpp"
#include "Request/Request.hpp"
#include "Response/Response.hpp"
# define BUFFER_SIZE 1024
int initiate_master_sockets(std::vector<Server> &server, std::vector<TcpListener> &tcpListener);
void run_server(std::vector<Server> &servers, std::vector<TcpListener> &tcpListener);
void parse_config_file(char *av, std::vector<Server> &server);
int check_server(std::vector<Server> &server);
void exit_failure(std::string str);