-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTTP_Server.hpp
More file actions
33 lines (31 loc) · 860 Bytes
/
HTTP_Server.hpp
File metadata and controls
33 lines (31 loc) · 860 Bytes
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
#define BUFFER_SIZE 8192
#ifndef http_server_hpp
#define http_server_hpp
#include "ServerSocket.hpp"
#include <poll.h>
#include <fstream>
#include <string>
class HTTP_Server {
private:
bool is_simple_request;
char buf[BUFFER_SIZE];
public:
struct request_line {
char* method;
char* request_uri;
char* http_version;
int method_size;
int request_uri_size;
int http_version_size;
};
struct full_request {
struct request_line request_line;
char* general_header;
char* request_header;
char* entity_header;
char* entity_body;
};
void evaluate_request(char* buf, struct full_request* request);
HTTP_Server(const char *port, char* path, int path_size);
};
#endif