Phonegap Bonjour/Zeroconf or Websocket IP Discovery from HTML5

别等时光非礼了梦想. 提交于 2020-01-01 12:32:30

问题


I am trying to implement a Phonegap (HTML5) application which connects to a Websocket server (running in an embedded device, also has Bonjour service) to exchange data within home network.

I would like to know the best possible way of detecting the server IP using Phonegap. I have explored and found that Titanium and Quickconnect support Bonjour. But I would like to stick to Phonegap for various other reasons.

Any alternative way of detecting the server IP within the local network is also okay.

Need your suggestion.


回答1:


There are two iOS Bonjour plugin implementations for Phonegap (Cordova) on Github:

  • https://github.com/jarnoh/cordova-dnssd
  • https://github.com/SayGoSolutions/Cordova-BonjourBrowserProxy

Unfortunately I haven't found a cross-platform implementation.



来源:https://stackoverflow.com/questions/8676590/phonegap-bonjour-zeroconf-or-websocket-ip-discovery-from-html5

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