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

📄 hlsock.h

📁 VC++高级编程技巧与示例
💻 H
字号:
#if !defined(AFX_HLSOCK_H__FF747E1D_0DE9_4235_900A_134E53F74E79__INCLUDED_)
#define AFX_HLSOCK_H__FF747E1D_0DE9_4235_900A_134E53F74E79__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HLSock.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRWSock command target
#include "Math.h"
#include "Afxtempl.h"
#include "winuser.h"

#define CLT_CLOSE   WM_USER+1
#define CLT_TALKING WM_USER+2

typedef struct 
{
	char m_strName[255]; //客户名字;
	char m_strAction[255];//当前操作;
	BOOL m_bOnline;    //客户是否在线;
	BOOL m_bAngular;   //是否是角度制;
	double m_dbData;   //数据;
}_DATA;

class CRWSock : public CSocket
{
// Attributes
public:

// Operations
public:
	CRWSock();
	virtual ~CRWSock();

// Overrides
public:
	double Calculate(double x);
	_DATA m_Dat;
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRWSock)
	public:
	virtual void OnReceive(int nErrorCode);
	//}}AFX_VIRTUAL

	// Generated message map functions
	//{{AFX_MSG(CRWSock)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

// Implementation
protected:
};

/////////////////////////////////////////////////////////////////////////////
// CLSock command target

class CLSock : public CSocket
{
// Attributes
public:
	CPtrList m_RWSocks;
// Operations
public:
	CLSock();
	virtual ~CLSock();

// Overrides
public:
	void CloseSocket(CRWSock * pSocket);
	void CloseAllSockets();
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLSock)
	public:
	virtual void OnAccept(int nErrorCode);
	//}}AFX_VIRTUAL

	// Generated message map functions
	//{{AFX_MSG(CLSock)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

// Implementation
protected:
};

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_HLSOCK_H__FF747E1D_0DE9_4235_900A_134E53F74E79__INCLUDED_)

⌨️ 快捷键说明

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