Finds the first multicast DNS service publishing Coaty MQTT broker information. Returns a promise that is resolved with the given service object or rejected if the service cannot be discovered within the given timeout interval.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the number of milliseconds after which the returned promise is rejected (defaults to 2147483647)
the name of the mDNS service to find (defaults to Coaty MQTT Broker
)
the type of the mDNS service to find (defaults to coaty-mqtt
)
Finds the first multicast DNS service of the given name and type. Returns a promise that is resolved with the given service object or rejected if the service cannot be discovered within the given timeout interval.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the name of the mDNS service to find
the number of milliseconds after which the returned promise is rejected (optional, default is 2147483647)
Finds the first multicast DNS service publishing Coaty WAMP router information. Returns a promise that is resolved with the given service object or rejected if the service cannot be discovered within the given timeout interval.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the number of milliseconds after which the returned promise is rejected (defaults to 2147483647)
the name of the mDNS service to find (defaults to Coaty WAMP Router
)
the type of the mDNS service to find (defaults to coaty-wamp
)
Publish Coaty MQTT broker information using a multicast DNS (a.k.a mDNS, Bonjour) service with the given parameters.
Note that the host
parameter is optional. By default, the local
hostname is used (not the local host IP address!). To resolve this
hostname, your network DNS system must be configured properly. If this is
not the case, you can pass the target IP address of your mDNS service
explicitely.
The function returns a promise that is resolved with the published
service object of type MulticastDnsService
. If an error occurs while
publishing, the promise is rejected.
The broker's websocket port (ws-port
) is published in the TXT record of
the service.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the broker's port (default value is 1883)
the broker's websocket port (default value is 9883)
the name of the mDNS service (default value is Coaty MQTT Broker
)
the type of the mDNS service (default value is coaty-mqtt
)
the broker IP address to be published with the service (default is local hostname)
Publish a multicast DNS (a.k.a mDNS, Bonjour, Zeroconf) service with the given parameters. Typically used for discovering the Coaty broker/router or for discovering Coaty configuration URLs hosted on a web server. The published mDNS service contains a JSON TXT record including specific connection parameters. The keys and values of these parameters are always strings so you can easily concat them to form a URL, etc.
Note that the host
parameter is optional. By default, the local
hostname is used (not the local host IP address!). To resolve this
hostname, your network DNS system must be configured properly. If this is
not the case, you can pass the target IP address of your mDNS service
explicitely.
The function returns a promise that is resolved with the published
service object of type MulticastDnsService
. If an error occurs while
publishing, the promise is rejected.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the name of the mDNS service
the type of the mDNS service
the port of the mDNS service
the TXT record containing additional key value pairs (optional)
the host IP address to be published with the service (optional, defaults to local hostname)
Publish Coaty WAMP router information using a multicast DNS (a.k.a mDNS, Bonjour) service with the given parameters.
Note that the host
parameter is optional. By default, the local
hostname is used (not the local host IP address!). To resolve this
hostname, your network DNS system must be configured properly. If this is
not the case, you can pass the target IP address of your mDNS service
explicitely.
The function returns a promise that is resolved with the published
service object of type MulticastDnsService
. If an error occurs while
publishing, the promise is rejected.
The WAMP router's URL path (path
) and realm (realm
) is published in
the TXT record of the service.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
the router's URL path (default value is /
)
the router's realm (default value is coaty
)
the router's port (default value is 80)
the name of the mDNS service (default value is Coaty WAMP Router
)
the type of the mDNS service (default value is coaty-wamp
)
the router IP address to be published with the service (default is local hostname)
Unpublish all published multicast DNS services. Returns a promise that is resolved after all services have been unpublished.
This function can only be used in a server-side environment (Node.js), not in a browser runtime.
Generated using TypeDoc
Provides static methods to publish and find multicast DNS services.