forked from jimingmin/frame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logic_thread.h
44 lines (37 loc) · 963 Bytes
/
logic_thread.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
42
43
44
/*
* logic_thread.h
*
* Created on: May 3, 2015
* Author: jimm
*/
#ifndef LOGIC_THREAD_H_
#define LOGIC_THREAD_H_
#include "common/common_thread.h"
#include "netevent/net_handler.h"
#include "netevent/net_acceptor.h"
#include "frame_impl.h"
#include "frame_listenentry.h"
#include <list>
using namespace std;
using namespace NETEVENT;
using namespace FRAME;
class CLogicThread : public CThread
{
public:
CLogicThread(CriticalSection *pSection, const char *szServerName, IInitFrame *pIniter, list<CFrameListenEntry *> &stListenEntryList);
virtual ~CLogicThread();
//启动线程
virtual int32_t Start();
//结束线程
virtual int32_t Terminate();
//线程入口函数
virtual void Execute();
protected:
CriticalSection *m_pSection;
char m_szServerName[1024];
CNetHandler *m_pNetHandler;
IInitFrame *m_pIniter;
list<CFrameListenEntry *> &m_stListenEntryList;
list<CAcceptor *> m_stAcceptorList;
};
#endif /* LOGIC_THREAD_H_ */