Skip to content

Instantly share code, notes, and snippets.

@daboross
Created March 4, 2014 02:48
Show Gist options
  • Save daboross/9339405 to your computer and use it in GitHub Desktop.
Save daboross/9339405 to your computer and use it in GitHub Desktop.
/* NI-cRio NetConsole on node js -- Evin Ugur */
var dgram = require("dgram");
var listener = dgram.createSocket("udp4");
//ports used for NetConsole - it uses two: one for in and out, probably to avoid a race condition
var NETCONSOLE_PORT_IN = 6666;
//Server to listen for data on NetConsole
listener.on("message", function(msg, rinfo) {
process.stdout.write(msg.toString());
});
listener.bind(NETCONSOLE_PORT_IN);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment