windows C++ 通过UDP广播获取网络中所有设备ip地址

上传者: dxzysk | 上传时间: 2021-09-25 11:06:46 | 文件大小: 20.61MB | 文件类型: RAR
代码描述,参见博客:http://blog.csdn.net/dxzysk/article/details/55506450 本文是windows版,VC++,在VS2010环境下调试成功。有时候需要搜索网络中的设备,机器,服务器等,这就要要用到UDP广播的方式,发送广播命令,广播给网络中的每一个主机,该主机搜到广播命令后,立刻发送给请求端自己的设备信息,这里以IP信息为例子。

文件下载

资源详情

[{"title":"( 83 个子文件 20.61MB ) windows C++ 通过UDP广播获取网络中所有设备ip地址","children":[{"title":"DemoUDPBroadcast - csdn","children":[{"title":"UDPClient","children":[{"title":"Client.dsp <span style='color:#111;'> 3.32KB </span>","children":null,"spread":false},{"title":"client.plg <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"Client.vcxproj.user <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"Client.vcxproj <span style='color:#111;'> 5.97KB </span>","children":null,"spread":false},{"title":"Client.cpp <span style='color:#111;'> 4.11KB </span>","children":null,"spread":false},{"title":"client.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"vc100.idb <span style='color:#111;'> 363.00KB </span>","children":null,"spread":false},{"title":"Client.obj <span style='color:#111;'> 27.66KB </span>","children":null,"spread":false},{"title":"Client.pdb <span style='color:#111;'> 1.62MB </span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 13.94KB </span>","children":null,"spread":false},{"title":"mt.read.1.tlog <span style='color:#111;'> 214B </span>","children":null,"spread":false},{"title":"rc.write.1.tlog <span style='color:#111;'> 390B </span>","children":null,"spread":false},{"title":"Client.log <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false},{"title":"rc.read.1.tlog <span style='color:#111;'> 382B </span>","children":null,"spread":false},{"title":"link.3316.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Client.Build.CppClean.log <span style='color:#111;'> 3.12KB </span>","children":null,"spread":false},{"title":"Client.ilk <span style='color:#111;'> 924.18KB </span>","children":null,"spread":false},{"title":"mt.command.1.tlog <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"cl.command.1.tlog <span style='color:#111;'> 792B </span>","children":null,"spread":false},{"title":"link-cvtres.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Client.exe.intermediate.manifest <span style='color:#111;'> 381B </span>","children":null,"spread":false},{"title":"Client.lastbuildstate <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"Client.exe.embed.manifest.res <span style='color:#111;'> 472B </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"link.3316-cvtres.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"link-cvtres.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Client.exe.embed.manifest <span style='color:#111;'> 406B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"rc.command.1.tlog <span style='color:#111;'> 626B </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 3.57KB </span>","children":null,"spread":false},{"title":"Client_manifest.rc <span style='color:#111;'> 208B </span>","children":null,"spread":false},{"title":"link.3316-cvtres.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"mt.write.1.tlog <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"link.3316.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Client.exe <span style='color:#111;'> 388.50KB </span>","children":null,"spread":false},{"title":"vc100.pdb <span style='color:#111;'> 100.00KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"DemoUDPBroadcast.ncb <span style='color:#111;'> 49.00KB </span>","children":null,"spread":false},{"title":"DemoUDPBroadcast.sln <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false},{"title":"DemoUDP.opt <span style='color:#111;'> 57.50KB </span>","children":null,"spread":false},{"title":"DemoUDPBroadcast.opt <span style='color:#111;'> 57.50KB </span>","children":null,"spread":false},{"title":"DemoUDPBroadcast.sdf <span style='color:#111;'> 27.14MB </span>","children":null,"spread":false},{"title":"UDPServer","children":[{"title":"Server.plg <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"Server.cpp <span style='color:#111;'> 5.06KB </span>","children":null,"spread":false},{"title":"Server.vcxproj <span style='color:#111;'> 6.59KB </span>","children":null,"spread":false},{"title":"Server.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false},{"title":"Server.vcxproj.user <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"Server.dsp <span style='color:#111;'> 3.32KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"vc100.idb <span style='color:#111;'> 515.00KB </span>","children":null,"spread":false},{"title":"link.7936-cvtres.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"Server.lastbuildstate <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 21.29KB </span>","children":null,"spread":false},{"title":"Server.exe.intermediate.manifest <span style='color:#111;'> 381B </span>","children":null,"spread":false},{"title":"mt.read.1.tlog <span style='color:#111;'> 214B </span>","children":null,"spread":false},{"title":"rc.write.1.tlog <span style='color:#111;'> 390B </span>","children":null,"spread":false},{"title":"rc.read.1.tlog <span style='color:#111;'> 382B </span>","children":null,"spread":false},{"title":"Server.pdb <span style='color:#111;'> 1.77MB </span>","children":null,"spread":false},{"title":"Server.Build.CppClean.log <span style='color:#111;'> 3.12KB </span>","children":null,"spread":false},{"title":"mt.command.1.tlog <span style='color:#111;'> 434B </span>","children":null,"spread":false},{"title":"link.7936.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"cl.command.1.tlog <span style='color:#111;'> 792B </span>","children":null,"spread":false},{"title":"link-cvtres.read.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"link.7936.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Server.exe.embed.manifest <span style='color:#111;'> 406B </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"Server.obj <span style='color:#111;'> 70.09KB </span>","children":null,"spread":false},{"title":"Server.ilk <span style='color:#111;'> 967.36KB </span>","children":null,"spread":false},{"title":"link-cvtres.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"Server.exe <span style='color:#111;'> 391.00KB </span>","children":null,"spread":false},{"title":"Server.log <span style='color:#111;'> 4.47KB </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"rc.command.1.tlog <span style='color:#111;'> 626B </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 3.71KB </span>","children":null,"spread":false},{"title":"Server_manifest.rc <span style='color:#111;'> 208B </span>","children":null,"spread":false},{"title":"mt.write.1.tlog <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"Server.exe.embed.manifest.res <span style='color:#111;'> 472B </span>","children":null,"spread":false},{"title":"link.7936-cvtres.write.1.tlog <span style='color:#111;'> 2B </span>","children":null,"spread":false},{"title":"vc100.pdb <span style='color:#111;'> 236.00KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"DemoUDPBroadcast.suo <span style='color:#111;'> 14.00KB </span>","children":null,"spread":false},{"title":"DemoUDP.ncb <span style='color:#111;'> 49.00KB </span>","children":null,"spread":false},{"title":"ipch","children":[{"title":"client-f04a8b14","children":[{"title":"client-55af5795.ipch <span style='color:#111;'> 31.69MB </span>","children":null,"spread":false}],"spread":true},{"title":"server-3fe33a44","children":[{"title":"server-bcbd38ad.ipch <span style='color:#111;'> 43.81MB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • lin13750107574 :
    谢谢楼主,非常有用!
    2018-03-12
  • anlisy :
    效果一般吧
    2017-05-19

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明