⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serverctrlsock.cpp

📁 一个VC实现的,用G.729a实现的语言对讲的例子
💻 CPP
字号:
// ServerCtrlSock.cpp : implementation file
//

#include "stdafx.h"
#include "RemoteTalk.h"
#include "ServerCtrlSock.h"
#include "RemoteTalkDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CServerCtrlSock

CServerCtrlSock::CServerCtrlSock()
{
	CRemoteTalkDlg* pDlg=(CRemoteTalkDlg*)::AfxGetMainWnd();
}

CServerCtrlSock::~CServerCtrlSock()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CServerCtrlSock member functions

void CServerCtrlSock::OnConnect(int nErrorCode) 
{

    pDlg->m_bServerCtrlConnect=TRUE;
	
	CAsyncSocket::OnConnect(nErrorCode);
}

void CServerCtrlSock::OnReceive(int nErrorCode) 
{
	SERVER_CTRL_MSG msg;
	memset(&msg,0,sizeof(SERVER_CTRL_MSG));
	Receive(&msg,sizeof(SERVER_CTRL_MSG));
	pDlg->ExcuteServerCommand(msg);
	// TODO: Add your specialized code here and/or call the base class
	
	CAsyncSocket::OnReceive(nErrorCode);
}

⌨️ 快捷键说明

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