mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Updated mins node to use default resolve order
Should help remove issue #159
This commit is contained in:
parent
ce677d221b
commit
9e9a5e21be
@ -33,13 +33,15 @@
|
|||||||
<script type="text/x-red" data-help-name="discovery">
|
<script type="text/x-red" data-help-name="discovery">
|
||||||
<p>Provides a Bonjour / Avahi / Zeroconf discovery node.</p>
|
<p>Provides a Bonjour / Avahi / Zeroconf discovery node.</p>
|
||||||
<p><b>msg.payload</b> contains the service object on both arrival and leaving.</p>
|
<p><b>msg.payload</b> contains the service object on both arrival and leaving.</p>
|
||||||
<p><b>msg.state</b> contains boolean true or false depending if the service has arrived (true) or gone away (false).</p>
|
<p><b>msg.state</b> contains boolean <i>true</i> or <i>false</i> depending
|
||||||
|
if the service has arrived (<i>true</i>) or gone away (<i>false</i>).</p>
|
||||||
<p>Within the msg.payload object the most interesting things are:
|
<p>Within the msg.payload object the most interesting things are:
|
||||||
<ul><li>msg.payload.name</li>
|
<ul><li>msg.payload.name</li>
|
||||||
<li>msg.payload.interface</li>
|
<li>msg.payload.networkInterface</li>
|
||||||
|
<li>msg.payload.host</li>
|
||||||
<li>msg.payload.port</li>
|
<li>msg.payload.port</li>
|
||||||
<li>msg.payload.addresses</li>
|
<li>msg.payload.addresses - an array</li>
|
||||||
<li>msg.payload.txtRecord</li></ul></p>
|
<li>msg.payload.txtRecord - an object</li></ul></p>
|
||||||
<p>For a full list of official service types see <i><a href="http://www.dns-sd.org/ServiceTypes.html" target="_new">this list</a></i>.</p>
|
<p>For a full list of official service types see <i><a href="http://www.dns-sd.org/ServiceTypes.html" target="_new">this list</a></i>.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -25,11 +25,12 @@ module.exports = function(RED) {
|
|||||||
RED.nodes.createNode(this, n);
|
RED.nodes.createNode(this, n);
|
||||||
this.topic = n.topic || "";
|
this.topic = n.topic || "";
|
||||||
this.service = n.service;
|
this.service = n.service;
|
||||||
var sequence = [
|
// var sequence = [
|
||||||
mdns.rst.DNSServiceResolve(),
|
// mdns.rst.DNSServiceResolve(),
|
||||||
mdns.rst.getaddrinfo({families: [4] })
|
// mdns.rst.getaddrinfo({families: [4] })
|
||||||
];
|
// ];
|
||||||
var browser = mdns.createBrowser(this.service,{resolverSequence: sequence});
|
// var browser = mdns.createBrowser(this.service,{resolverSequence: sequence});
|
||||||
|
var browser = mdns.createBrowser(this.service);
|
||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
browser.on('serviceUp', function(service) {
|
browser.on('serviceUp', function(service) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-discovery",
|
"name" : "node-red-node-discovery",
|
||||||
"version" : "0.0.10",
|
"version" : "0.0.11",
|
||||||
"description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.",
|
"description" : "A Node-RED node that uses Bonjour / Avahi to discover nearby services.",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"mdns" : "2.2.*"
|
"mdns" : "2.2.*"
|
||||||
|
Loading…
Reference in New Issue
Block a user