Server (socket) update

main
Jurij Podgoršek 2022-03-05 15:18:01 +01:00
parent 3983cfe8e2
commit 135a8f49a0
1 changed files with 9 additions and 2 deletions

View File

@ -118,7 +118,8 @@ sss.on('listening', () => {
sss.bind(6696, '224.0.1.9');
const scudp = new osc.UDPPort({
socket: sss
remotePort: 57120
//socket: sss
})
scudp.on('open', () => {
@ -126,7 +127,10 @@ scudp.on('open', () => {
})
scudp.on('message', (msg) => {
if (DEBUG) {
console.log('got UDP msg', msg);
}
osclients.forEach( client => {
if (client) {
//console.log("sending", msg, info)
@ -200,6 +204,9 @@ const sendAll = (msg, info, oscWS, osclients) => {
})
if (scudp) {
if (DEBUG) {
console.log("UDP SEND", msg)
}
scudp.send(msg)
}
}