serveras.cpp

来自「《Visual C++视频技术方案宝典》配套光盘」· C++ 代码 · 共 54 行

CPP
54
字号
// ServerAS.cpp : implementation file
//

#include "stdafx.h"
#include "NetPhone.h"
#include "ServerAS.h"
#include "NetPhoneDlg.h"
#include "mmsystem.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CServerAS sServer;
extern CServerAS sListen;
extern CNetPhoneDlg* pDlg;
/////////////////////////////////////////////////////////////////////////////
// CServerAS

CServerAS::CServerAS()
{
}

CServerAS::~CServerAS()
{
}


// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CServerAS, CAsyncSocket)
	//{{AFX_MSG_MAP(CServerAS)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif	// 0

/////////////////////////////////////////////////////////////////////////////
// CServerAS member functions

void CServerAS::OnAccept(int nErrorCode) 
{
	// TODO: Add your specialized code here and/or call the base class
	Accept(sServer);
	pDlg->AcceptConnect();
	CAsyncSocket::OnAccept(nErrorCode);
}

void CServerAS::OnReceive(int nErrorCode) 
{
	// TODO: Add your specialized code here and/or call the base class
	pDlg->OnReceive();
	CAsyncSocket::OnReceive(nErrorCode);
}

⌨️ 快捷键说明

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