Bonjour Discovery in Javascript? Maybe?

前端 未结 4 1036
感情败类
感情败类 2020-12-31 01:35

So its a longshot, I\'ll start with that.

Is it/could it be possible to discover bonjour advertised HTTP services in javascript alone?

Why would this be usef

相关标签:
4条回答
  • 2020-12-31 02:14

    I know this an old thread. Found this github project which allows you to discover (and publish) services using mDNS - https://github.com/watson/bonjour

    A Bonjour/Zeroconf protocol implementation in pure JavaScript. Publish services on the local network or discover existing services using multicast DNS.

    0 讨论(0)
  • 2020-12-31 02:18

    This seems to be possible using the Chrome's Sockets API, but I've only taken a cursory look.

    mdns-browser seems to implement this using said APIs.

    0 讨论(0)
  • 2020-12-31 02:26

    This library claims to do it in Javascript : http://quickconnect.sourceforge.net/browser/index.html

    I have to admit that I would be very interested if it was possible to discover bonjour services in javascript :)

    0 讨论(0)
  • 2020-12-31 02:27

    The short answer is no ( at least not on the Linux platform ).

    Funny you should ask: I have been working on bringing this sort of functionality within reach of web browsers. One of my success in this endeavor is an NPAPI mDNS plugin for Chrome. The plugin basically interfaces with Avahi ZeroConf (mDNS - Multicast DNS Server).

    I am currently working on yet another bridge to close this gap: a "lightweight" database ( a la CouchDb ) that will be used by desktop applications to register their HTTP end-points. Extensions would then read those end-points from Javascript and be able to interact directly with the advertised services.

    UPDATE: There is hope through W3C Service Discovery.

    0 讨论(0)
提交回复
热议问题