📄 client.h
字号:
#include "msg.h"
#include "Buffer.h"
#define DATA_BUFSIZE 256
class CClient{
public:
SOCKET m_Socket; //client socket handle
DWORD m_iMsgNum; //which msg need to send to the client
CAutoBuffer m_SendBuff; //an auto buff use send msg
CAutoBuffer m_RecvBuff; //an auto buff use recv msg
//WSABUF wsaBuf; //use by wsasend and wsarecv
DWORD BytesRECV; //how many bytes recved
DWORD BytesSEND; //how many bytes sended
bool m_bWrite;
wchar_t name[NAME_LEN];
//CMsgList *m_ptrMsgList; //point to send message list
public:
CClient *Next; //point to the next client
public:
CClient(int nIncrement = 512);
~CClient();
bool SendMsg();
bool RecvMsg();
bool CodingBuff(CMsg *ptrMsg);
bool DecodingBuff(CMsg *ptrMsg);
__forceinline void SendBuffRest(){
m_SendBuff.ReSet();
}
__forceinline void RecvBuffRest(){
m_RecvBuff.ReSet();
}
__forceinline SOCKET GetSocket(){return m_Socket;}
__forceinline DWORD GetMsgNum(){return m_iMsgNum;}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -