osc: add support for special target "self", broadcast osc to other clients after sending the messages

This commit is contained in:
jean-emmanuel 2017-07-21 16:28:34 +02:00
parent 49900ef211
commit 51f694b764
2 changed files with 11 additions and 4 deletions

View file

@ -615,9 +615,9 @@
"root"
],
"target": [
"127.0.0.1:8080"
"self"
],
"value": "",
"value": "{ \"color\": \"auto\" }",
"values": {
"Default": "{ \"color\": \"auto\" }",
"Orange": "{ \"color\": \"orange\" }"
@ -684,7 +684,7 @@
"scroll": true
}
],
"color": "orange",
"color": "auto",
"css": "",
"value": "",
"precision": 0,

View file

@ -185,7 +185,6 @@ module.exports = {
}
}
clients[clientId].broadcast.emit('receiveOsc', data)
var targets = []
@ -195,6 +194,11 @@ module.exports = {
for (var i in targets) {
if (targets[i] == 'self') {
ipc.send('receiveOsc',data,clientId)
continue
}
var host = targets[i].split(':')[0],
port = targets[i].split(':')[1]
@ -216,6 +220,9 @@ module.exports = {
}
}
clients[clientId].broadcast.emit('receiveOsc', data)
},
addWidget(data, clientId) {