This PR adds "experimental" support for processing OSC Bundle.
There is a new type of event on the osc Server called "bundle" that will get called with a decoded bundle when the OSC Server receives a bundle. It is possible for bundles to be recursive. There is currently no logic for processing a bundle as a series of messages.
import { Server } from 'node-osc';
var oscServer = new Server(3333, '0.0.0.0', () => {
console.log('OSC Server is listening');
});
oscServer.on('bundle', function (bundle) {
bundle.elements.forEach((element, i) => {
console.log(`Timestamp: ${bundle.timetag[i]}`);
console.log(`Message: ${element}`)
});
oscServer.close();
});
This PR also refactors the internals fairly significantly to have the Server now use osc-min rather than manually decoded packets using jspack. This allows us to drop support for the jspack dependency and get Bundle support for free 🎉. This changes some internal errors and as such I am cautiously marking this PR as Semver-Major.
This PR adds "experimental" support for processing OSC Bundle.
There is a new type of event on the osc Server called "bundle" that will get called with a decoded bundle when the OSC Server receives a bundle. It is possible for bundles to be recursive. There is currently no logic for processing a bundle as a series of messages.
This PR also refactors the internals fairly significantly to have the Server now use
osc-min
rather than manually decoded packets using jspack. This allows us to drop support for thejspack
dependency and get Bundle support for free 🎉. This changes some internal errors and as such I am cautiously marking this PR as Semver-Major.