mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
make udp node consistent with it's info.... (re params passed out)
This commit is contained in:
parent
b8c460b825
commit
fbb45a8961
@ -42,9 +42,9 @@ module.exports = function(RED) {
|
|||||||
server.on('message', function (message, remote) {
|
server.on('message', function (message, remote) {
|
||||||
var msg;
|
var msg;
|
||||||
if (node.datatype =="base64") {
|
if (node.datatype =="base64") {
|
||||||
msg = { payload:message.toString('base64'), fromip:remote.address+':'+remote.port };
|
msg = { payload:message.toString('base64'), fromip:remote.address+':'+remote.port, ip:remote.address, port:remote.port };
|
||||||
} else if (node.datatype =="utf8") {
|
} else if (node.datatype =="utf8") {
|
||||||
msg = { payload:message.toString('utf8'), fromip:remote.address+':'+remote.port };
|
msg = { payload:message.toString('utf8'), fromip:remote.address+':'+remote.port, ip:remote.address, port:remote.port };
|
||||||
} else {
|
} else {
|
||||||
msg = { payload:message, fromip:remote.address+':'+remote.port, ip:remote.address, port:remote.port };
|
msg = { payload:message, fromip:remote.address+':'+remote.port, ip:remote.address, port:remote.port };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user