forked from YbencheL/WEBSERV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.hpp
More file actions
48 lines (38 loc) · 1.02 KB
/
Copy pathclient.hpp
File metadata and controls
48 lines (38 loc) · 1.02 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
#ifndef CLIENT_HPP
#define CLIENT_HPP
# include <iostream>
# include "request/includes/request.hpp"
# include "request/includes/parseRequest.hpp"
# include "response.hpp"
#include "cgi/cgi.hpp"
# define GREEN "\033[0;32m"
# define RED "\033[31m"
# define BLUE "\x1B[36m"
# define YELLOW "\x1B[93m"
# define PINK "\x1B[35m"
# define RSET "\033[0m"
# define DEFAULT_EXTENSION ".txt"
# define DEFAULT_MEDIA_TYPE "text/plain"
class Request;
struct reqParse;
struct Client
{
unsigned short int port;
unsigned int host;
ServerBlockLookup config_file_info;
const ServerBlock *server_conf;
const LocationBlock *location_conf;
Request req;
reqParse parse;
response res;
bool reqReady;
Cgi cgiHandler;
bool is_serving_file;
int static_file_fd;
off_t file_size;
off_t bytes_sent;
unsigned int last_activity;
bool close_connection;
};
void inisializeClient(Client &client);
#endif