資源簡介
這是自己在網絡課程實驗中編寫的一個實時語音聊天系統,采用面向連接的TCP傳輸控制協議。包括客戶端和服務器端,利用雙緩沖技術來控制音頻的連續性和實時性。
代碼片段和文件信息
//?Client.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Client.h“
#include?“ClientDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CClientApp
BEGIN_MESSAGE_MAP(CClientApp?CWinApp)
//{{AFX_MSG_MAP(CClientApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CClientApp?construction
CClientApp::CClientApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CClientApp?object
CClientApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CClientApp?initialization
BOOL?CClientApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CClientDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????740??2009-10-27?22:35??AUDIOTALK\AUDIOTALK.dsw
?????文件?????115712??2009-10-28?21:47??AUDIOTALK\AUDIOTALK.ncb
?????文件?????109568??2009-10-28?21:47??AUDIOTALK\AUDIOTALK.opt
?????文件??????21164??2009-10-27?11:49??AUDIOTALK\Client\Client.aps
?????文件???????1325??2009-10-27?17:00??AUDIOTALK\Client\Client.clw
?????文件???????2157??2009-10-26?22:55??AUDIOTALK\Client\Client.cpp
?????文件???????4272??2009-10-28?18:26??AUDIOTALK\Client\Client.dsp
?????文件???????1324??2009-10-26?22:55??AUDIOTALK\Client\Client.h
?????文件????????246??2009-10-28?21:39??AUDIOTALK\Client\Client.plg
?????文件???????5714??2009-10-26?23:27??AUDIOTALK\Client\Client.rc
?????文件??????11414??2009-10-28?21:38??AUDIOTALK\Client\ClientDlg.cpp
?????文件???????2473??2009-10-27?23:10??AUDIOTALK\Client\ClientDlg.h
?????文件?????110655??2009-10-28?21:38??AUDIOTALK\Client\Debug\Client.exe
?????文件?????237840??2009-10-28?21:38??AUDIOTALK\Client\Debug\Client.ilk
?????文件??????14416??2009-10-27?23:10??AUDIOTALK\Client\Debug\Client.obj
?????文件????5887452??2009-10-27?23:10??AUDIOTALK\Client\Debug\Client.pch
?????文件?????377856??2009-10-28?21:38??AUDIOTALK\Client\Debug\Client.pdb
?????文件???????2720??2009-10-27?23:10??AUDIOTALK\Client\Debug\Client.res
?????文件??????43835??2009-10-28?21:38??AUDIOTALK\Client\Debug\ClientDlg.obj
?????文件?????118846??2009-10-27?23:10??AUDIOTALK\Client\Debug\StdAfx.obj
?????文件?????214016??2009-10-28?21:39??AUDIOTALK\Client\Debug\vc60.idb
?????文件?????380928??2009-10-28?21:38??AUDIOTALK\Client\Debug\vc60.pdb
?????文件???????3579??2009-10-26?22:55??AUDIOTALK\Client\ReadMe.txt
?????文件???????1078??2009-10-26?22:55??AUDIOTALK\Client\res\Client.ico
?????文件????????398??2009-10-26?22:55??AUDIOTALK\Client\res\Client.rc2
?????文件????????913??2009-10-26?23:27??AUDIOTALK\Client\Resource.h
?????文件????????208??2009-10-26?22:55??AUDIOTALK\Client\StdAfx.cpp
?????文件???????1183??2009-10-27?22:09??AUDIOTALK\Client\StdAfx.h
?????文件????5112832??2009-10-27?23:23??AUDIOTALK\Server\Debug\Server.bsc
?????文件?????110657??2009-10-27?23:23??AUDIOTALK\Server\Debug\Server.exe
............此處省略38個文件信息
- 上一篇:DEM——三維地形可視化
- 下一篇:C++ zip文件解壓
評論
共有 條評論