UNPKG

@simon.jaeggi/tuio

Version:

Updated version of the Tuio.js server. Bridges OSC to WebSocket using Socket.IO v4 for multitouch and tangible interaction in web applications.

13 lines (10 loc) 348 B
const port = 3333; const host = 'localhost'; const dgram = require("dgram"); const oscMsg = Buffer.from("/test\0\0\0,s\0\0hello\0\0\0\0", "ascii"); const client = dgram.createSocket("udp4"); client.send(oscMsg, 0, oscMsg.length, port, host, (err) => { if (err) console.error(err); else console.log("OSC message sent"); client.close(); });