问题
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