From 135a8f49a025287f85f39459f68e9bca65bd562a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Sat, 5 Mar 2022 15:18:01 +0100 Subject: [PATCH] Server (socket) update --- server.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 5a0d9e0..74d7f2f 100644 --- a/server.js +++ b/server.js @@ -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) => { - console.log('got UDP msg', 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) } }