📄 tcpsocket.cpp
字号:
// TCPSocket.cpp : implementation file
//
#include "stdafx.h"
#include "Tcp2Serial.h"
#include "TCPSocket.h"
#include "Tcp2SerialDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTCPSocket
CTCPSocket::CTCPSocket()
{
}
CTCPSocket::~CTCPSocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CTCPSocket, CAsyncSocket)
//{{AFX_MSG_MAP(CTCPSocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CTCPSocket member functions
void CTCPSocket::SetPart( CDialog* dlg )
{
m_dlg = dlg;
}
void CTCPSocket::OnSend( int nErrorCode )
{
if ( nErrorCode == 0 )
{
(( CTcp2SerialDlg* )m_dlg )->OnSend();
}
CAsyncSocket::OnSend( nErrorCode );
}
void CTCPSocket::OnAccept( int nErrorCode )
{
if ( nErrorCode == 0 )
{
(( CTcp2SerialDlg* )m_dlg )->OnAccecp();
}
CAsyncSocket::OnAccept( nErrorCode );
}
void CTCPSocket::OnReceive( int nErrorCode )
{
if ( nErrorCode == 0 )
{
(( CTcp2SerialDlg* )m_dlg )->OnReceive();
}
CAsyncSocket::OnReceive(nErrorCode);
}
void CTCPSocket::OnClose( int nErrorCode )
{
// TODO: Add your specialized code here and/or call the base class
if ( nErrorCode == 0 )
{
(( CTcp2SerialDlg* )m_dlg )->OnClose();
}
CAsyncSocket::OnClose( nErrorCode );
}
void CTCPSocket::OnConnect( int nErrorCode )
{
if ( nErrorCode == 0 )
{
(( CTcp2SerialDlg* )m_dlg )->OnConnect();
}
CAsyncSocket::OnConnect( nErrorCode );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -