osc: add support for special target "self", broadcast osc to other clients after sending the messages
This commit is contained in:
parent
49900ef211
commit
51f694b764
2 changed files with 11 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue