mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -372,12 +372,13 @@ module.exports = function(RED) {
|
||||
socket.setKeepAlive(true,120000);
|
||||
if (socketTimeout !== null) { socket.setTimeout(socketTimeout); }
|
||||
node.log(RED._("tcpin.status.connection-from",{host:socket.remoteAddress, port:socket.remotePort}));
|
||||
connectedSockets.push(socket);
|
||||
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
|
||||
socket.on('timeout', function() {
|
||||
node.log(RED._("tcpin.errors.timeout",{port:node.port}));
|
||||
socket.end();
|
||||
});
|
||||
socket.on('data', function(d) {
|
||||
// console.log("DATA",d)
|
||||
});
|
||||
socket.on('close',function() {
|
||||
node.log(RED._("tcpin.status.connection-closed",{host:socket.remoteAddress, port:socket.remotePort}));
|
||||
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
||||
@@ -388,6 +389,8 @@ module.exports = function(RED) {
|
||||
connectedSockets.splice(connectedSockets.indexOf(socket),1);
|
||||
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
|
||||
});
|
||||
connectedSockets.push(socket);
|
||||
node.status({text:RED._("tcpin.status.connections",{count:connectedSockets.length})});
|
||||
});
|
||||
|
||||
node.on("input", function(msg, nodeSend, nodeDone) {
|
||||
|
@@ -178,7 +178,7 @@ module.exports = function(RED) {
|
||||
var sock;
|
||||
var p = this.outport || this.port || "0";
|
||||
node.tout = setTimeout(function() {
|
||||
if (udpInputPortsInUse[p]) {
|
||||
if ((p != 0) && udpInputPortsInUse[p]) {
|
||||
sock = udpInputPortsInUse[p];
|
||||
if (node.multicast != "false") {
|
||||
sock.setBroadcast(true);
|
||||
|
@@ -47,5 +47,9 @@
|
||||
<code>{{global.name}}</code>, or for persistable store <code>store</code> use <code>{{flow[store].name}}</code> or
|
||||
<code>{{global[store].name}}</code>.
|
||||
<p><b>Note: </b>By default, <i>mustache</i> will escape any non-alphanumeric or HTML entities in the values it substitutes.
|
||||
To prevent this, use <code>{{{triple}}}</code> braces.
|
||||
To prevent this, use <code>{{{triple}}}</code> braces.</p>
|
||||
<p>If you need to use <code>{{ }}</code> within your content, you can change the characters
|
||||
used to mark the templated sections. For example, to use <code>[[ ]]</code>
|
||||
instead, add the following line to the top of the template:</p>
|
||||
<pre>{{=[[ ]]=}}</pre>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user