chaosc-fetcher/testhub.js

17 lines
512 B
JavaScript
Raw Permalink Normal View History

2012-12-17 13:58:03 +00:00
var osc = require('node-osc');
var port = process.argv.length > 2 ? process.argv[2] : '5001';
var sender1 = new osc.Client('127.0.0.1', 6001);
var sender2 = new osc.Client('127.0.0.1', 6002);
var sender3 = new osc.Client('127.0.0.1', 6003);
var sender4 = new osc.Client('127.0.0.1', 6004);
var receiver = new osc.Server(port, '0.0.0.0');
receiver.on("message", function (msg, rinfo) {
sender1.send(msg[0],msg[1]);
sender2.send(msg[0],msg[1]);
sender3.send(msg[0],msg[1]);
sender4.send(msg[0],msg[1]);
});