-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServer.hpp
More file actions
43 lines (35 loc) · 1.48 KB
/
Server.hpp
File metadata and controls
43 lines (35 loc) · 1.48 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Server.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fpalumbo <fpalumbo@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/28 15:17:28 by jfazi #+# #+# */
/* Updated: 2024/09/02 19:04:10 by fpalumbo ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SERVER_HPP
#define SERVER_HPP
#include "webserv.h"
#include "Request.hpp"
#include "Parsconfig.hpp"
class Server
{
private:
std::vector<Parsconfig *> configFile;
public:
Server();
~Server();
void SetParsconfig(Parsconfig *pars);
int GetParsconfigIndexFromHostPort(string request);
string GetHostPort(string request);
string GetHost(string request);
string GetPort(string request);
std::string readRequest(SOCKET clientSock);
void FreeAllConfig();
int CreateSocket(int port, bool isListening, struct sockaddr_in addr);
void Init();
void CloseSockets();
};
#endif