Quick and dirty Node bindings for Avahi service advertisements.
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.
Returns true
if the platform is supported by node_avahi_pub.
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.remove()
- stops the service's advertisement on the network.
See example.coffee for useage.
Licenced under the MIT License. See http://opensource.org/licenses/MIT