How to use the osc.WebSocketPort function in osc

To help you get started, we’ve selected a few osc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mimic-sussex / sema / SemaOSCRelay / index.js View on Github external
wss.on("connection", function(socket) {
	console.log("Connection from Sema Editor");
	var socketPort = new osc.WebSocketPort({
		socket: socket
	});

	var relay = new osc.Relay(udp, socketPort, {
		raw: true
	});
});
github grz0zrg / fsynth / osc_relay / osc_relay.js View on Github external
wss.on("connection", function (socket) {
        websocketPort = new osc.WebSocketPort({
            socket: socket,
            metadata: true
        });

        websocketPort.on("ready", function () {
            console.log("OSC Relay ready!");
        });

        websocketPort.on("message", function (m) {
            //console.log("An OSC Message was received!", m);
            udpPort.send(m, "127.0.0.1", 57120);
        });

        websocketPort.on("error", function (e) {
            console.log("websocketPort error: ", e);
        });
github colinbdclark / osc.js-examples / browser / index.js View on Github external
wss.on("connection", function (socket) {
    console.log("A Web Socket connection has been established!");
    var socketPort = new osc.WebSocketPort({
        socket: socket
    });

    var relay = new osc.Relay(udpPort, socketPort, {
        raw: true
    });
});
github colinbdclark / osc.js-examples / udp-browser / index.js View on Github external
wss.on("connection", function (socket) {
    console.log("A Web Socket connection has been established!");
    var socketPort = new osc.WebSocketPort({
        socket: socket
    });

    var relay = new osc.Relay(udp, socketPort, {
        raw: true
    });
});