Zeroconf Name resolution

╄→гoц情女王★ 提交于 2019-12-04 04:48:20

I think you can use DynDns (www.dyndns.org), it's free for what you are trying to do. You can use it even if you have no possibility of getting a fixed ip-address. In that case you would use the dyndns updater utility. You could e.g. register ourCompanyName.dyndns.org and it will always get routed to your local computer.

For Windows users to be able to 'automagically' find your device using Zeroconf, they would need to:

  1. Have an mDNS daemon installed (like the mDNSResponder you mentioned, which is available for free from Apple)
  2. Have a second piece of software installed that knows how to issue queries to the mDNS daemon and display available services on the local network (i.e., your device's embedded web server)

Bonjour for Windows comes bundled with an Internet Explorer plugin that's adequate for item #2, and might not be 'too techie' for your users. (They would just need to download and install Bonjour for Windows and tick the box to install the Internet Explorer plugin.) Mac users could just use the Safari browser, which is already Zeroconf-aware.

The final piece of the puzzle---and the trickiest part---is that you would have to modify your own software to register your controller with the "local mDNS daemon". However, there's no such thing, presumably, because your 'control device' is an embedded system. So you'd need to write your own bare-bones mDNS daemon. It's not that hard to do, and you can use Apple's mDNSPosix code as a starting point. But, depending on your hardware constraints, this might not be feasible.

All in all, Zeroconf can be a tricky stack of protocols to work with. The 'zero configuration' aspect applies only to the user's experience. To a developer, it presents a fairly steep learning curve. If your users typically only have a single instance of your device running, it may be overkill.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!