client.h
来自「关于ACE的书籍,对于学习ACE很有帮助,这里只有上册,下册过些时候在传.」· C头文件 代码 · 共 40 行
H
40 行
#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 + =
减小字号Ctrl + -
显示快捷键?