-
Notifications
You must be signed in to change notification settings - Fork 145
/
Client.h
41 lines (34 loc) · 881 Bytes
/
Client.h
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
#include "socket_header.h"
#include "Interface/Mutex.h"
#include <deque>
class FCGIProtocolDriver;
class OutputCallback;
class FCGIRequest;
class CClient
{
public:
CClient();
~CClient();
SOCKET getSocket();
OutputCallback *getOutputCallback();
FCGIProtocolDriver *getFCGIProtocolDriver();
void addRequest( FCGIRequest* req);
bool removeRequest( FCGIRequest *req);
size_t numRequests(void);
FCGIRequest* getRequest(size_t num);
FCGIRequest* getAndRemoveReadyRequest(void);
bool isProcessing(void);
bool setProcessing(bool b);
void set(SOCKET ps, OutputCallback *poutput, FCGIProtocolDriver * pdriver );
void lock();
void unlock();
void remove();
private:
SOCKET s;
OutputCallback * output;
FCGIProtocolDriver * driver;
bool processing;
IMutex * mutex;
IScopedLock *m_lock;
std::deque<FCGIRequest*> requests;
};