mysocket.cpp
来自「实验七 在网络中传输图像:采用C++」· C++ 代码 · 共 72 行
CPP
72 行
// MySocket.cpp : implementation file
//
#include "stdafx.h"
#include "Draw.h"
#include "MySocket.h"
#include "DrawDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMySocket
CMySocket::CMySocket()
{
}
CMySocket::~CMySocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CMySocket, CAsyncSocket)
//{{AFX_MSG_MAP(CMySocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CMySocket member functions
void CMySocket::SetParent(CDocument* pDoc)
{
m_pDoc=pDoc;
}
void CMySocket::OnAccept(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CDrawDoc*)m_pDoc)->OnAccept();
}
void CMySocket::OnClose(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CDrawDoc*)m_pDoc)->OnClose();
}
void CMySocket::OnReceive(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CDrawDoc*)m_pDoc)->OnReceive();
}
void CMySocket::OnSend(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CDrawDoc*)m_pDoc)->OnSend();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?