| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*************************************************************************
- 【文件名】 NetLinkMgr.h
- 【功能模块和目的】 网络连接管理器类头文件
- 【开发者及日期】 郑石诺 2015/03/20
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- #pragma once
- class CPduEntity;
- /*************************************************************************
- 【类名】 CNetLinkMgr
- 【功能】
- 【接口说明】 网络连接管理器类
- 【开发者及日期】 郑石诺 2015/03/20
- 【版本】 V1.0.0
- 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
- 【更改记录】
- *************************************************************************/
- class CNetLinkMgr : public IPduLinkProc, public IPduCommProc
- {
- SINGLETON_DECLARE(CNetLinkMgr)
- public:
- CNetLinkMgr(void);
- ~CNetLinkMgr(void);
- bool open(void);
- void close(void);
- void send(CPduEntity* a_pPdu);
- bool send(CPduEntity* a_pPdu, PDU_DEV_TYPE a_DestType, int a_DestId);
- ////////////////////////////////////////////////////////////////////////////////
- //继承自IPduLinkProc, IPduCommProc
- void OnLinkStateChanged(const PduLinkContent& linkContent); // PDU连接状态变化事件处理
- void OnRecvCommand(CPduEntity* a_pPduEntity); // PDU命令到达事件处理
- private:
- void __onClientConnect(const PduLinkContent& linkContent);
- void __onClientReg(const PduLinkContent& linkContent);
- void __procReqReg(CPduEntity* a_pReq); // 注册请求
- private:
- UINT m_ClientCount;
- };
|