client.cpp
来自「一个服务器端小软件,方便初学者了解基于服务器-客户端的工作原理」· C++ 代码 · 共 45 行
CPP
45 行
// Client.cpp : implementation file
//
#include "stdafx.h"
#include "ServerNet.h"
#include "Client.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClient
CClient::CClient(CMainFrame *pMainFrame)
{
m_pMainFrame=pMainFrame;
}
CClient::~CClient()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CClient, CSocket)
//{{AFX_MSG_MAP(CClient)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CClient member functions
void CClient::OnReceive(int nErrorCode)
{
m_pMainFrame->FetchMsg(this);
CSocket::OnReceive(nErrorCode);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?