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

📄 socketthread.cpp

📁 CMPP3.0模拟网关
💻 CPP
字号:
// SocketThread.cpp : implementation file
//

#include "stdafx.h"
#include "CmppGateway.h"
#include "SocketThread.h"

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

/////////////////////////////////////////////////////////////////////////////
// SocketThread

IMPLEMENT_DYNCREATE(SocketThread, CWinThread)

SocketThread::SocketThread()
{
}

SocketThread::~SocketThread()
{
}

BOOL SocketThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here
	CCmppGatewayDlg *pDlg = new CCmppGatewayDlg();
	BOOL bCreat = sockServer.Create(pDlg->m_nPort, SOCK_STREAM);
	bCreat = sockServer.Listen();
	delete pDlg;
	return TRUE;
}

int SocketThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(SocketThread, CWinThread)
	//{{AFX_MSG_MAP(SocketThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// SocketThread message handlers

⌨️ 快捷键说明

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