資源簡介
武漢理工大學計算機網絡與通信課程設計——基于C語言的UDP的通信程序設計,包含完整源代碼。C語言編寫 VC++6.0編譯。可實現實時交互通信功能,另外包含客戶機和服務器端的運行截圖

代碼片段和文件信息
//?chat.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“chat.h“
#include?“chatDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChatApp
BEGIN_MESSAGE_MAP(CChatApp?CWinApp)
//{{AFX_MSG_MAP(CChatApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CChatApp?construction
CChatApp::CChatApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CChatApp?object
CChatApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CChatApp?initialization
BOOL?CChatApp::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
CChatDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????36456??2013-01-08?12:24??基于UDP的通信程序設計\chat\chat.aps
?????文件???????1444??2013-01-08?14:12??基于UDP的通信程序設計\chat\chat.clw
?????文件???????2129??2013-01-08?10:43??基于UDP的通信程序設計\chat\chat.cpp
?????文件???????4123??2013-01-08?10:43??基于UDP的通信程序設計\chat\chat.dsp
?????文件????????937??2013-01-08?13:47??基于UDP的通信程序設計\chat\chat.dsw
?????文件???????1302??2013-01-08?10:43??基于UDP的通信程序設計\chat\chat.h
?????文件??????91136??2013-01-08?14:12??基于UDP的通信程序設計\chat\chat.ncb
?????文件??????58880??2013-01-08?14:12??基于UDP的通信程序設計\chat\chat.opt
?????文件????????242??2013-01-08?13:12??基于UDP的通信程序設計\chat\chat.plg
?????文件???????5808??2013-01-08?12:24??基于UDP的通信程序設計\chat\chat.rc
?????文件???????8013??2013-01-08?12:24??基于UDP的通信程序設計\chat\chatDlg.cpp
?????文件???????1462??2013-01-08?12:22??基于UDP的通信程序設計\chat\chatDlg.h
?????文件?????110673??2013-01-08?12:27??基于UDP的通信程序設計\chat\Debug\chat.exe
?????文件?????200292??2013-01-08?12:27??基于UDP的通信程序設計\chat\Debug\chat.ilk
?????文件??????12901??2013-01-08?11:53??基于UDP的通信程序設計\chat\Debug\chat.obj
?????文件????5570940??2013-01-08?10:54??基于UDP的通信程序設計\chat\Debug\chat.pch
?????文件?????353280??2013-01-08?12:24??基于UDP的通信程序設計\chat\Debug\chat.pdb
?????文件???????2820??2013-01-08?12:24??基于UDP的通信程序設計\chat\Debug\chat.res
?????文件??????28320??2013-01-08?12:27??基于UDP的通信程序設計\chat\Debug\chatDlg.obj
?????文件?????106374??2013-01-08?10:54??基于UDP的通信程序設計\chat\Debug\StdAfx.obj
?????文件?????205824??2013-01-08?13:13??基于UDP的通信程序設計\chat\Debug\vc60.idb
?????文件?????364544??2013-01-08?12:24??基于UDP的通信程序設計\chat\Debug\vc60.pdb
?????文件???????3543??2013-01-08?10:43??基于UDP的通信程序設計\chat\ReadMe.txt
?????文件???????1078??2013-01-08?10:43??基于UDP的通信程序設計\chat\res\chat.ico
?????文件????????396??2013-01-08?10:43??基于UDP的通信程序設計\chat\res\chat.rc2
?????文件???????1141??2013-01-08?12:24??基于UDP的通信程序設計\chat\resource.h
?????文件????????206??2013-01-08?10:43??基于UDP的通信程序設計\chat\StdAfx.cpp
?????文件???????1102??2013-01-08?10:43??基于UDP的通信程序設計\chat\StdAfx.h
?????文件?????106647??2013-01-08?13:52??基于UDP的通信程序設計\chat\talk\Debug\StdAfx.obj
?????文件?????106582??2013-01-08?13:52??基于UDP的通信程序設計\chat\talk\Debug\talk.exe
............此處省略76個文件信息
- 上一篇:C++網絡五子棋(源碼)
- 下一篇:Fast ANN神經網絡算法源碼
評論
共有 條評論