www.pudn.com > CraftFTP_gb.rar > DataChannel.cpp
// DataChannel.cpp : implementation file
//
#include "stdafx.h"
#include "CraftFTP.h"
#include "MainFrm.h"
#include "DataChannel.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDataChannel
CDataChannel::CDataChannel(CMainFrame * pMainFrame)
{
m_pMainFrame = pMainFrame;
}
CDataChannel::~CDataChannel()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CDataChannel, CProxySocket)
//{{AFX_MSG_MAP(CDataChannel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CDataChannel member functions
void CDataChannel::OnConnect(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CProxySocket::OnConnect(nErrorCode);
m_pMainFrame->OnDataChannelConnect(nErrorCode);
}
void CDataChannel::OnReceive(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CProxySocket::OnReceive(nErrorCode);
m_pMainFrame->OnDataChannelReceive(nErrorCode);
}
void CDataChannel::OnClose(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CProxySocket::OnClose(nErrorCode);
m_pMainFrame->OnDataChannelClose(nErrorCode);
}
void CDataChannel::OnSend(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CProxySocket::OnSend(nErrorCode);
m_pMainFrame->OnDataChannelSend(nErrorCode);
}
void CDataChannel::OnResolve(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CProxySocket::OnResolve(nErrorCode);
if(nErrorCode == 0)
Connect();
//连接代理服务器
m_pMainFrame->OnDataChannelResolve(nErrorCode);
}
void CDataChannel::OnProxyOperationFailed(int nOpID)
{
}
void CDataChannel::OnListenFinished(unsigned long & retProxyIp, int & retProxyPort)
{
}