worksocket.cpp

来自「本人买的<<VC++项目开发实例>>源代码配套光盘.」· C++ 代码 · 共 65 行

CPP
65
字号
// WorkSocket.cpp : implementation file
//

#include "stdafx.h"
#include "WorkSocket.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWorkSocket

//##ModelId=3E32BC1402F8
CWorkSocket::CWorkSocket()
{
}

//##ModelId=3E32BC1402F9
CWorkSocket::~CWorkSocket()
{
}


// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CWorkSocket, CSocket)
	//{{AFX_MSG_MAP(CWorkSocket)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif	// 0

/////////////////////////////////////////////////////////////////////////////
// CWorkSocket member functions

//##ModelId=3E32BC140302
int CWorkSocket::Receive(void* lpBuf, int nBufLen, int nFlags) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CSocket::Receive(lpBuf, nBufLen, nFlags);
}

//##ModelId=3E32BC140316
int CWorkSocket::Send(const void* lpBuf, int nBufLen, int nFlags) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CSocket::Send(lpBuf, nBufLen, nFlags);
}

//##ModelId=3E32BC140322
BOOL CWorkSocket::OnMessagePending() 
{
	MSG msg;
	if(::PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_NOREMOVE))
	{
		CancelBlockingCall();
		return FALSE;
	};
	return CSocket::OnMessagePending();
}

⌨️ 快捷键说明

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