connectsock.h

来自「简单的远程控制工具,分为服务器与客户斋,让你了解socket编程的知识.」· C头文件 代码 · 共 78 行

H
78
字号
#if !defined(AFX_CONNECTSOCK_H__D7118456_7A53_11D3_B52A_A9E9C4477050__INCLUDED_)
#define AFX_CONNECTSOCK_H__D7118456_7A53_11D3_B52A_A9E9C4477050__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ConnectSock.h : header file
//
#ifndef __CLNTSOCK_H__
#define __CLNTSOCK_H__

class CMsg;
class CMainFrame;

/////////////////////////////////////////////////////////////////////////////
// CConnectSock command target

class CConnectSock : public CSocket
{
	DECLARE_DYNAMIC(CConnectSock);
private:
	CConnectSock(const CConnectSock& rSrc);         // no implementation
	void operator=(const CConnectSock& rSrc);  // no implementation

// Operations
public:
	CConnectSock(CMainFrame* pWnd);

	virtual ~CConnectSock();

// Attributes
public:
	int m_nMsgCount;
	CSocketFile* m_pFile;
	CArchive* m_pArchiveIn;
	CArchive* m_pArchiveOut;
	CMainFrame* m_pWnd;
	BOOL IsAborted() { return m_pArchiveOut == NULL; }

// Operations
public:
	void Init();
	void Abort();
	void Del_Archive ();
	void SendMsg(CMsg* pMsg);
	void ReceiveMsg(CMsg* pMsg);

// Overrides
public:
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConnectSock)
	public:
	virtual void OnReceive(int nErrorCode);
	//}}AFX_VIRTUAL

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

// Implementation
public:

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

};
#endif // __CLNTSOCK_H__

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONNECTSOCK_H__D7118456_7A53_11D3_B52A_A9E9C4477050__INCLUDED_)

⌨️ 快捷键说明

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