资源简介
局域网广播是UDP的应用之一。UDP协议与TCP协议同样是基于IP协议的,但与TCP不同的是它不需要协议层提供质量保证,因此,UDP在很多需要实时数据传输的情况下比较常用。此外,由于不提供质量保证,服务器没有必要一直处于等待状态,这样就大大减轻了服务器的负担。

代码片段和文件信息
// BCServer.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “BCServer.h“
#include “BCServerDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBCServerApp
BEGIN_MESSAGE_MAP(CBCServerApp CWinApp)
//{{AFX_MSG_MAP(CBCServerApp)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CBCServerApp construction
CBCServerApp::CBCServerApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CBCServerApp object
CBCServerApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CBCServerApp initialization
BOOL CBCServerApp::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
CBCServerDlg 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;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 114830 2018-05-28 16:35 01\BCServer.exe
....... 22244 2018-05-28 16:35 01\source code\BCServer\BCServer.aps
....... 2104 2018-05-28 16:35 01\source code\BCServer\BCServer.clw
....... 2185 2018-05-28 16:35 01\source code\BCServer\BCServer.cpp
....... 4596 2018-05-28 16:35 01\source code\BCServer\BCServer.dsp
....... 541 2018-05-28 16:35 01\source code\BCServer\BCServer.dsw
....... 1346 2018-05-28 16:35 01\source code\BCServer\BCServer.h
....... 107520 2018-05-28 16:35 01\source code\BCServer\BCServer.ncb
....... 55808 2018-05-28 16:35 01\source code\BCServer\BCServer.opt
....... 250 2018-05-28 16:35 01\source code\BCServer\BCServer.plg
....... 6092 2018-05-28 16:35 01\source code\BCServer\BCServer.rc
....... 6065 2018-05-28 16:35 01\source code\BCServer\BCServerDLG.cpp
....... 1635 2018-05-28 16:35 01\source code\BCServer\BCServerDLG.h
....... 999 2018-05-28 16:35 01\source code\BCServer\ClientSocket.cpp
....... 1192 2018-05-28 16:35 01\source code\BCServer\ClientSocket.h
....... 1259 2018-05-28 16:35 01\source code\BCServer\ListenSocket.cpp
....... 1191 2018-05-28 16:35 01\source code\BCServer\ListenSocket.h
....... 974 2018-05-28 16:35 01\source code\BCServer\PortSetDlg.cpp
....... 1222 2018-05-28 16:35 01\source code\BCServer\PortSetDlg.h
....... 3615 2018-05-28 16:35 01\source code\BCServer\ReadMe.txt
....... 1078 2018-05-28 16:35 01\source code\BCServer\res\BCServer.ico
....... 400 2018-05-28 16:35 01\source code\BCServer\res\BCServer.rc2
....... 1002 2018-05-28 16:35 01\source code\BCServer\resource.h
....... 82944 2018-05-28 16:35 01\source code\BCServer\ServerSocket.ncb
....... 56832 2018-05-28 16:35 01\source code\BCServer\ServerSocket.opt
....... 210 2018-05-28 16:35 01\source code\BCServer\StdAfx.cpp
....... 1102 2018-05-28 16:35 01\source code\BCServer\StdAfx.h
....... 1029 2018-05-28 16:35 01\source code\UseSocket\ClientUseSocket.cpp
....... 1220 2018-05-28 16:35 01\source code\UseSocket\ClientUseSocket.h
....... 1071 2018-05-28 16:35 01\source code\UseSocket\ConnectDlg.cpp
............此处省略54个文件信息
- 上一篇:Unity数据存储插件
- 下一篇:logisim搭建32位单周期CPU
相关资源
- makefiletest.tar.gz
- VisualStudioUninstaller vs卸载工具
- 组态王驱动开发包3.0.0.7(中文)
- 多窗口后台鼠标连点器
- 使用选择性重传协议实现UDP可靠通信
- VC 获得文件属性 获取文件的创建时
- 读者写者问题(读者优先,写者优先
- 用VC 编写的仿QQ聊天室程序源代码
- 外点法程序
- 外罚函数程序
- qt-电子点菜系统
- 推箱子及人工智能寻路C 源代码
- 自己写的航空订票系统c 版--数据结构
- 数据结构实验魔王语言
- MUSIC算法c 实现
- C 餐厅叫号系统(QT平)
- 国际象棋c 完整版
-
ob
jectARX给Auto CAD加工具条 - 画图程序MFC/VC/VC CRectTracker 串行化
- MFC网络编程实例
- c 课程设计 职工信息管理系统
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- 清华大学 c 郑莉 ppt课件
- c 程序判断离散数学中命题公式
- 多项式求和(数据结构C 版)
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- 用C 实现的对网络上的ARP数据包进行
评论
共有 条评论