パッケージの詳細

mdns2

agnat3.7k2.1.4

multicast DNS service discovery

zeroconf, bonjour, dns_sd, mDNSResponder

readme

h1. mdns -- node.js Service Discovery

THIS IS A FORK OF "agnat/node_mdns":https://github.com/agnat/node_mdns WITH ADDITIONAL PATCHES. THE MOMENT agnat/node_mdns BECOMES ACTIVE AGAIN, WE WILL SYNC UP AND REMOVE THIS REPOSITORY.

THE NAME OF THIS FORK ON NPM IS @mdns2@

|. Package: | mdns | |. Description: | multicast DNS service discovery | |. Version: | 2.1.0 | |. Installation: | @npm install mdns2@ (see below) | |_. Documentation: | "mdns user guide":http://agnat.github.com/node_mdns/user_guide.html | |_. License: | "MIT":http://github.com/agnat/node_mdns/blob/master/LICENSE | |_. Donations: | !http://api.flattr.com/button/flattr-badge-large.png(Flattr this git repository)!:https://flattr.com/submit/auto?user_id=agnat&url=https://github.com/agnat/node_mdns&title=node_mdns&tags=github&category=software |

mdns adds multicast DNS service discovery, also known as zeroconf or bonjour to "node.js":/joyent/node. It provides an object based interface to announce and browse services on the local network.

h2. Synopsis

bc.. // import the module var mdns = require('mdns');

// advertise a http server on port 4321 var ad = mdns.createAdvertisement(mdns.tcp('http'), 4321); ad.start();

// watch all http servers var browser = mdns.createBrowser(mdns.tcp('http')); browser.on('serviceUp', function(service) { console.log("service up: ", service); }); browser.on('serviceDown', function(service) { console.log("service down: ", service); }); browser.start();

// discover all available service types var all_the_types = mdns.browseThemAll(); // all_the_types is just another browser...

h2. Installation

On Linux and other systems using the avahi daemon the avahi dns_sd compat library and its header files are required. On debianesque systems the package name is @libavahi-compat-libdnssd-dev@. On other platforms Apples "mDNSResponder":http://opensource.apple.com/tarballs/mDNSResponder/ is recommended. Care should be taken not to install more than one mDNS stack on a system.

On Windows you are going to need Apples "Bonjour SDK for Windows". You can download it either from Apple (registration required) or various unofficial sources. Take your pick. After installing the SDK restart your shell or command prompt and make sure the @BONJOUR_SDK_HOME@ environment variable is set. You'll also need a compiler. Microsoft Visual Studio Express will do. On Windows node >=0.7.9 is required.

mdns is available as a npm package:

bc. npm install mdns2

If you want to play with the latest source code, here is a more manual approach:

bc. git clone http://github.com/Wizcorp/node_mdns cd node_mdns npm link && npm test

In case you want to run or even publish your package using the development version of mdns you may set the version field to a tarball URL:

bc. { "name": "discomvobulator" , "version": "0.0.1" , "description": "covers all your discomvobulation needs" , "dependencies": { "mdns": "https://github.com/Wizcorp/node_mdns/tarball/master" } }

h2. Documentation

See the "user guide":http://agnat.github.com/node_mdns/user_guide.html.

h2. Contributors

... in random order:

Your name is missing on the list? Shame on me. Please open an issue.

h2. Bugs and Contributions

If you find a bug, please report it using the "issue tracker":http://github.com/Wizcorp/node_mdns/issues.

更新履歴

CHANGES

Version 2.1.3 to 2.1.4

  • added service to errors from the resolver (bjornstar)

Version 2.1.2 to 2.1.3

  • applied the fix from 2.1.0 to remaining parts of the code base (achingbrain)

Version 2.1.1 to 2.1.2

  • fixed an exception that was thrown when a service went down along with its network interface (achingbrain)

Version 2.1.0 to 2.1.1

  • fixed the interfaceIndex patch by mrose17 as it was breaking on Node 0.8 (ronkorving)

Version 2.0.0-dev to 2.1.0

  • errno was broken in Node v0.10 (mrose17)
  • allow interfaceIndex to be "really big" (mrose17)

Version 1.1.0 to 2.0.0-dev

  • empty version release (agnat)

Version 1.0.0 to 1.1.0

  • better handling of network interfaces
  • error handling: exceptions/errors contain the numeric error code now

Version 0.0.7 to 1.0.0

  • replaced IOWatcher with a libuv based SocketWatcher (Tony Ealden)
  • fixed an API typo: filterAdresses -> filterAddresses (major version bumped)
  • first release that actually works on windows

Version 0.0.6 to 0.0.7

  • Bugfix: convert NULL strings to undefined values in callbacks

Version 0.0.5 to 0.0.6

  • use node-gyp in gyp based builds
  • prepared a windows port

Version 0.0.4 to 0.0.5

  • Publish and receive TXT records

  • Build universal binaries on Mac OS This helps to work around a architecture mismatch between gyp-build nodes and waf-build addons.

  • Added experimental gyp-based build

  • Continuous integration and coverage testing.

  • Fixed FreeBSD build

Version 0.0.3 to 0.0.4

  • New service type objects: The strings have been replaced with a small ServiceType object. Also, older versions used TCP as the default protocol. The protocol is now mandatory. However, the new syntax is much more flexible. See user guide at http://agnat.github.com/node_mdns/user_guide.html#service_types.

  • The 'info' object is now called 'service'

  • The info.regtype property is now called service.type

  • The info.serviceName property is now called service.name

  • Callback signature changed: flags is now a property of the service object (service.flags)

  • possibly more

vim: spell spelllang=en_us :