-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKqueueUdata.cpp
52 lines (49 loc) · 991 Bytes
/
KqueueUdata.cpp
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
51
52
#include "KqueueUdata.hpp"
KqueueUdata::KqueueUdata()
{
_m_state = WAIT_CONNECT;
_m_requested_fd = -1;
}
void KqueueUdata::clean(){
_m_state = READ_REQUEST;
_m_requested_fd = -1;
_m_req.clean();
_m_res.clean();
}
/* getter & setter */
int KqueueUdata::getState(){
return _m_state;
}
Response& KqueueUdata::getResponse(){
return _m_res;
}
Request& KqueueUdata::getRequest(){
return _m_req;
}
FILE* KqueueUdata::getinFile(){
return _m_inFile;
}
FILE* KqueueUdata::getoutFile(){
return _m_outFile;
}
int KqueueUdata::getRequestedFd(){
return _m_requested_fd;
}
void KqueueUdata::setState(int state){
_m_state = state;
}
void KqueueUdata::setResponse(Response res){
_m_res = res;
}
void KqueueUdata::setRequest(Request req){
_m_req = req;
}
void KqueueUdata::setRequestedFd(int fd) {
_m_requested_fd = fd;
}
void KqueueUdata::setoutFile(FILE *f){
_m_outFile = f;
}
void KqueueUdata::setinFile(FILE *f){
_m_inFile = f;
}