如何查找特定的“UPnP 名称”在局域网上使用 C#?
我正在尝试制作一个程序,可以检测连接到本地网络的网络摄像机。相机支持 UPnP 和 Bonjour,因此它会弹出在 Windows 7 的 Network 文件夹中。唯一知道的是该文件夹中的名称。
我认为最简单的方法是让 Windows 完成工作并扫描网络文件夹。但这不是普通的文件夹,那么我该怎么做呢?
如果这是不可能的,当我只知道 UPnP 名称时如何找到这款相机?当我扫描本地网络上的 IP 时,主机名是通过 DHCP 给出的,因此无法用于识别它。
希望你有一些想法。
Anders
编辑:好的,我刚刚找到了 ManagedUPnP 库,它解决了我的问题。这样我就可以自己进行 UPnP 搜索。但如果有一种方法可以从 C# 查看网络“文件夹”,我仍然想知道:)
I am trying to make a program that can detect network cameras connected to the local network. The cameras support UPnP and Bonjour, so it pops up in the Network folder in Windows 7. The only thing a know is the name is gets in this folder.
I thought the easiest way would be to let Windows do the work and just scan through the network folder. But this is no ordinary folder, so how do I do that?
And if that is not possible, how do I find a this camera when I only know the UPnP name? When I scan the IP's on the local network, the host names are given via DHCP, so that can't be used to recognise it.
Hope you have some ideas.
Anders
EDIT: Okay I just found the ManagedUPnP library, which solved my problem. With that I can do the UPnP search myself. But if there is a way to look in the network "folder" from C# I would still like to know:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我刚刚找到了 ManagedUPnP 库,它解决了我的问题。这样我就可以自己进行 UPnP 搜索。
这里是托管 UPnP 的链接,http://managementupnp.codeplex.com/
编辑 1:
Codeplex 正在关闭,但看起来该项目已分叉到此处: https://github.com/jogibear9988 /托管UPnP
Okay I just found the ManagedUPnP library, which solved my problem. With that I can do the UPnP search myself.
Here a link to managed UPnP, http://managedupnp.codeplex.com/
Edit 1:
Codeplex is being shutdown, but it looks like the project has been forked to here: https://github.com/jogibear9988/ManagedUPnP