mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix udp node messages
(timing issue still outstanding)
This commit is contained in:
parent
35e2caff13
commit
60812b2d8a
@ -103,7 +103,7 @@ module.exports = function(RED) {
|
|||||||
var node = this;
|
var node = this;
|
||||||
|
|
||||||
var sock = dgram.createSocket(node.ipv); // default to ipv4
|
var sock = dgram.createSocket(node.ipv); // default to ipv4
|
||||||
|
|
||||||
sock.on("error", function(err) {
|
sock.on("error", function(err) {
|
||||||
// Any async error will also get reported in the sock.send call.
|
// Any async error will also get reported in the sock.send call.
|
||||||
// This handler is needed to ensure the error marked as handled to
|
// This handler is needed to ensure the error marked as handled to
|
||||||
@ -134,9 +134,9 @@ module.exports = function(RED) {
|
|||||||
});
|
});
|
||||||
} else if (node.outport != "") {
|
} else if (node.outport != "") {
|
||||||
sock.bind(node.outport);
|
sock.bind(node.outport);
|
||||||
node.log(RED._("udp.errors.ready",{outport:node.outport,host:node.addr,port:node.port}));
|
node.log(RED._("udp.status.ready",{outport:node.outport,host:node.addr,port:node.port}));
|
||||||
} else {
|
} else {
|
||||||
node.log(RED._("udp.errors.ready-nolocal",{host:node.addr,port:node.port}));
|
node.log(RED._("udp.status.ready-nolocal",{host:node.addr,port:node.port}));
|
||||||
}
|
}
|
||||||
|
|
||||||
node.on("input", function(msg) {
|
node.on("input", function(msg) {
|
||||||
|
@ -412,7 +412,7 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"access-error": "UDP access error, you may need root access for ports below 1024",
|
"access-error": "UDP access error, you may need root access for ports below 1024",
|
||||||
"error": "error: __error_",
|
"error": "error: __error__",
|
||||||
"bad-mcaddress": "Bad Multicast Address",
|
"bad-mcaddress": "Bad Multicast Address",
|
||||||
"interface": "Must be ip address of the required interface",
|
"interface": "Must be ip address of the required interface",
|
||||||
"ip-notset": "udp: ip address not set",
|
"ip-notset": "udp: ip address not set",
|
||||||
|
Loading…
Reference in New Issue
Block a user