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

📄 listens.cpp

📁 基于组态开发的VC源码
💻 CPP
字号:
/////////////////////////////////////////////////////////////////////////////
//	Author				:	Bala Murali
//	ListenS.cpp			:	implementation file
//	Creation Date		:	03/09/2000
//	Version				:	Initial Release
/////////////////////////////////////////////////////////////////////////////



#include "stdafx.h"
#include "XSockServer.h"
#include "ListenS.h"
#include "XSockServerCtl.h"

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

extern CXSockServerCtrl* m_pControl;

/////////////////////////////////////////////////////////////////////////////
// CListenS

CListenS::CListenS()
{
}

CListenS::~CListenS()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CListenS member functions

void CListenS::OnAccept(int nErrorCode) 
{
	if ( !nErrorCode )
	{
		m_ConnectS = new CConnectS();
		m_pControl->m_list.AddHead(m_ConnectS);
		
		if ( Accept( *m_ConnectS ) )
		{
			m_pControl->FireOnAccept(m_ConnectS->m_lChildId);
			return;
		}
	}

	m_pControl->SocketError(nErrorCode);
}

⌨️ 快捷键说明

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