avahi_pub

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i avahi_pub

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • d1plo1d