netsockettxj.cpp

来自「用算法来实现一个收费系统」· C++ 代码 · 共 75 行

CPP
75
字号
// NetSocketTxj.cpp : implementation file
//

#include "stdafx.h"
#include "lanesoft.h"
#include "NetSocketTxj.h"

//#include "stdafx.h"
#include "mainfrm.h"
//#include "LaneSoft.h"
//#include "NetSocket.h"
#include "NetComManger.h"


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

/////////////////////////////////////////////////////////////////////////////
// CNetSocketTxj
extern	BOOL m_BCloseTxj;
CNetSocketTxj::CNetSocketTxj(CNetComManger *pManger)
{
	m_pMangerTxj = pManger ;
	m_BCloseTxj = TRUE;
}



CNetSocketTxj::~CNetSocketTxj()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CNetSocketTxj member functions


void CNetSocketTxj::OnConnect(int nErrorCode) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CSocket::OnConnect(nErrorCode);
}

void CNetSocketTxj::OnClose(int nErrorCode) 
{
	// TODO: Add your specialized code here and/or call the base class
//	m_BCloseTxj = true;
	m_pMangerTxj->OnConnectCloseTxj() ;	
	CSocket::OnClose(nErrorCode);
}

BOOL CNetSocketTxj::IsClose()
{
	return 	m_BCloseTxj;

}

void CNetSocketTxj::HaveConnect()
{
	m_BCloseTxj = false;

}

⌨️ 快捷键说明

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