-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParse.h
More file actions
48 lines (37 loc) · 641 Bytes
/
Copy pathParse.h
File metadata and controls
48 lines (37 loc) · 641 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <bits/stdc++.h>
using namespace std;
#ifndef INC_PARSE_H
#define INC_PARSE_H
struct clientIdentity
{
int acceptId; // socketDescriptor
string ip;
int portNo;
string requestTime;
};
struct clientInfo
{
string r_method;
string r_type;
string r_version;
string r_firstline;
string r_filename;
string r_time;
string r_servetime;
int r_acceptid;
string r_ip;
u_int16_t r_portno;
int r_filesize;
bool status_file;
string r_ctype;
bool rootcheck;
int status_code;
};
class Parse
{
public:
bool fileExists(char *filename);
void parseRequest(clientIdentity);
void checkRequest(clientInfo);
};
#endif