UNPKG

node-osc

Version:

pyOSC inspired library for sending and receiving OSC messages

24 lines (18 loc) 473 B
'use strict'; const { Client, Message } = require('node-osc'); const client = new Client('127.0.0.1', 3333); const message = new Message('/address'); message.append('testing'); message.append('testing'); message.append(123); client.send(message, (err) => { if (err) { console.error(new Error(err)); } client.close(); }); // or // client.send('/address', 'testing', 'testing', 123); // or // const msg = new Message('/address', 1, 2, 3); // client.send(msg);