-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTcpThreadingServer.h
More file actions
39 lines (31 loc) · 879 Bytes
/
TcpThreadingServer.h
File metadata and controls
39 lines (31 loc) · 879 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
/*
* =====================================================================================
*
* Filename: TcpThreadingServer.h
*
* Description:
*
* Version: 1.0
* Created: 04/02/17 20:50:54
* Revision: none
* Compiler: g++
*
* Author: Feng Jie<[email protected]>
*
* =====================================================================================
*/
#ifndef __TCPTHREADINGSERVER_H
#define __TCPTHREADINGSERVER_H
#include "BaseSocketServer.h"
#define MAX_CONN 5
class TcpThreadingServer : public BaseSocketServer {
public:
TcpThreadingServer(const char *host, int port, BaseRequestHandler &handler);
~TcpThreadingServer() {};
bool serve_forever();
bool prepare();
int get_request();
private:
static void *process_request(void *arg);
};
#endif /* __TCPTHREADINGSERVER_H */