_emsp.h

来自「这是江苏企业通讯协议(联通版本)的一个Release」· C头文件 代码 · 共 68 行

H
68
字号
#if !defined __EMSP_H
#define __EMSP_H

#pragma once
#include <string>
#include ".\clientsocket.h"
#include ".\net_protocal.h" 
#include <time.h>
using namespace std;
namespace EMSP2_0
{

class C_EMSP
{
public:
	C_EMSP(void);
	~C_EMSP(void);
protected:
	ClientSocket* theSock;
	int m_SeqNum;
	char m_Crypt;
	int m_UserNo;
	char m_ConnType;
	char m_loginType;
	int m_CorpNo;
	string m_UserID;
	string m_pass;
	string m_SessionID;
	string m_SessionKey;
        bool m_logined;
       time_t lastActive;
	
public:
	ClientSocket* getSock(void);
	void SetSock(ClientSocket*  sock);
	char getConnectionType(void);
	void SetConnectionType(char cType);
	int GetCorpNO(void);
	void SetCorpNo(int aCorpNo);
	char GetCrypt(void);
	void SetCrypt(char cType);
	char GetLoginType(void);
	void SetLoginType(char lType);
	string getPassword(void);
	void SetPassWord(string psw);
	int GetCommandSeqNum(void);
	string GetSessionID(void);
	string GetSessionKey(void);
	string GetUserID(void);
	void SetUserID(string user);
	int GetUserNO(void);
	bool Login(void);
        bool isLogined();
protected:
	int timeout;
public:
	int GetTimeOut(void);
	void SetTimeOut(int value);
	bool logout(void);
protected:
	void FillHead(MsgHead* msgh, unsigned short CMDID);
public:
	void KeepConnection(void);
	int SendBuff(void* buff, int size);
	int ReceiveBuf(void* buff, int size);
};
};
#endif;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?