Created
March 4, 2014 02:48
-
-
Save daboross/9339405 to your computer and use it in GitHub Desktop.
Simplified version of https://github.com/FRCTeam1073-TheForceTeam/netconsole.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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