⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.h

📁 关于ACE的书籍,对于学习ACE很有帮助,这里只有上册,下册过些时候在传.
💻 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 + -