forked from p308945/MyNetWorkLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyServerTask.h
More file actions
45 lines (39 loc) · 1.03 KB
/
MyServerTask.h
File metadata and controls
45 lines (39 loc) · 1.03 KB
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
/*
* =====================================================================================
*
* Filename: MyServerTask.h
*
* Description: server tcp connection
*
* Version: 1.0
* Created: 09/28/2015 10:51:10 AM
* Revision: none
* Compiler: gcc
*
* Author: huangyun (hy), 895175589@qq.com
* Organization:
*
* =====================================================================================
*/
#ifndef _MY_SERVER_TASK_H_
#define _MY_SERVER_TASK_H_
#include "../base/MyTask.h"
#include "../base/CmdDispatcher.h"
namespace MyNameSpace
{
class MyServerTask : public MySockTask
{
public:
virtual bool cmdParse(const char *msg, int len);
MyServerTask(int sock, int id) : MySockTask(sock, id)
{
}
MyServerTask(int sock, int id, Dispatcher *iDispatcher, Dispatcher *oDispatcher) : MySockTask(sock, id), mInnerDispatcher(iDispatcher), mOutterDispatcher(oDispatcher)
{
}
private:
Dispatcher *mInnerDispatcher;
Dispatcher *mOutterDispatcher;
};
}
#endif