mysocket.cpp

来自「同学的毕业设计。基于Hpc密码的选择重传协议的数据传输。希望能供大家参考。谢谢 」· C++ 代码 · 共 60 行

CPP
60
字号
// Mysocket.cpp : implementation file
//

#include "stdafx.h"
#include "TestServer.h"
#include "Mysocket.h"
#include "TestServerDlg.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(CDialog *pWnd)
{
   m_pWnd = pWnd;
}

void CMysocket::OnAccept(int nErrorCode)
{ 
   //虚函数重载,对话框中对函数重定义
  ((CTestServerDlg*)m_pWnd)->OnAccept();
}

void CMysocket::OnReceive(int nErrorCode)
{
    //虚函数重载,对话框中对函数重定义
	((CTestServerDlg*)m_pWnd)->OnReceive();
}

void CMysocket::OnClose(int nErrorCode)
{
	//虚函数重载,对话框中对函数重定义
    ((CTestServerDlg*)m_pWnd)->OnClose();
}

⌨️ 快捷键说明

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