JmDNS、JmmDNS?有什么区别?我的捆绑包中要使用什么?
我是这里的新手。在查看 JmDNS 库 (3.4.1) 时,我无法清楚地了解 JmDNS 和 JmmDNS 实例之间的区别。我使用 JmmDNS 实例来发现服务,它在我的应用程序中正常工作。然后,我想将我的代码转换为捆绑包,但是没有任何效果。然后,如果我在捆绑包中使用 JmDNS 实例,我可以成功发现服务。如果有人让我更清楚这一点,我将不胜感激。 另外,根据文档,通过 JmmDNS,我们有一个 NetworktopologyListener,因此我们保证服务始终更新。 JmDNS 实例也能保证这一点吗?由于这个原因,我正在犹豫是否使用我的捆绑包(服务可能不会随着网络的变化而更新)
感谢您的帮助
I'm a newbie here. While having a look on the JmDNS library (3.4.1), I couldn't clearly get the difference between JmDNS and JmmDNS instances. I used an instance of JmmDNS to discover services and it works properly in my application. Then, I wanted to transform my code into a bundle, however, nothing works.Then, if I use an instance of JmDNS in my bundle, I can discover the services successfully. I would be grateful if someone make this clearer for me.
Also, according to documentation, with JmmDNS we have a NetworktopologyListener so we guarantee that the services are always updated. Is this guaranteed also with JmDNS instances? I'm hesitating to use my bundle for this reason (services may be not updated with changes in network)
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您查看文档,JmmDNS 的类文档会显示:
JmDNS
实例绑定到特定的接口
,并执行在该单个接口上维护 mDNS 响应程序所需的一切操作,包括服务发现和公告。FWIW,我最终编写了自己的 NetworkTopologyListener 和 JmmDNS ,它们的工作方式类似,因为根据我的经验,提供的功能效果不佳。接口发现在早期 Windows 7 上的某些 JVM v7 版本中根本不起作用,并且它与混合 IPv4 和 IPv6 的情况混淆。这两个当时还处于实验阶段。
If you look at the documentation, the class documentation for JmmDNS says:
A
JmDNS
instance is bound to a specificInterface
and does everything required to maintain an mDNS responder on that single interface, including service discovery and announcement.FWIW, I ended up writing my own
NetworkTopologyListener
andJmmDNS
work-alike because the ones supplied did not work very well in my experience. Interface discovery did not work at all in some JVM v7 versions on early Windows 7 and it got confused with mixed IPv4 and IPv6 situations. Those two were experimental at the time.