DragonNest/Server/ServiceMonitorEx/Source/NetSession.h
2024-12-20 16:56:44 +08:00

44 lines
1.8 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#pragma once
#include "Define.h"
#include "EventSelectTcpClient.h"
#include "ServiceInfo.h"
class CNetSession : public CEventSelectTcpClientSession<CNetSession>
{
public:
typedef CEventSelectTcpClientSession<CNetSession> TP_SUPER;
public:
CNetSession();
virtual ~CNetSession();
VOID Reset();
INT GetMonitorLevel() const { return m_MonitorLevel; }
VOID SetMonitorLevel(INT pMonitorLevel) { m_MonitorLevel = pMonitorLevel; }
DWORD Connect(UINT pIpAddress, WORD pPortNumber);
VOID Disconnect();
BOOL IsConnect();
VOID Reconnect();
VOID SetConnect(bool connect) {m_bConnect = connect;}
DWORD SendData(SHORT pMainCmd, SHORT pSubCmd, PCHAR pBuffer, INT pLen);
CServiceInfo* GetServiceInfo () {return m_pServiceInfo;}
private:
INT m_MonitorLevel; // eServerMonitorLevel
CServiceInfo* m_pServiceInfo;
UINT m_pIpAddress;
WORD m_pPortNumber;
bool m_bConnect;
};