Skip to content

Quick and dirty Node bindings for Avahi service advertisements.

Notifications You must be signed in to change notification settings

tthef/node_avahi_pub

 
 

Repository files navigation

Node Avahi Pub

Quick and dirty Node bindings for Avahi service advertisements.

Why?

Node MDNS used Avahi's bonjour compatibility API which meant advertisements didn't work. Node Avahi Pub uses the native Avahi API directly to get around that limitation.

API

isSupported()

Returns true if the platform is supported by node_avahi_pub.

publish( [opts] )

Services are announced by calling the publish method:

require('./avahi_pub').publish( [opts] )

Opts are as follows (avahi_pub needs all of them to be defined):

  • name - the advertised name of the service
  • type - the type of the service (ex. _http._tcp)
  • port - the port number the service is accessible on
  • data - the txt data for the service

return: calling publish returns a new service object

Service Objects

service.remove() - stops the service's advertisement on the network.

Useage

See example.coffee for useage.

License

Licenced under the MIT License. See http://opensource.org/licenses/MIT

About

Quick and dirty Node bindings for Avahi service advertisements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.9%
  • CoffeeScript 7.9%
  • JavaScript 6.6%
  • Python 2.6%