📄 _emsp.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -