【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-ServerAS.cpp,希望本篇文章对您学习有所帮助。
// 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);
}