Skip to content

Instantly share code, notes, and snippets.

@jrom
Created June 9, 2011 09:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrom/1016424 to your computer and use it in GitHub Desktop.
Save jrom/1016424 to your computer and use it in GitHub Desktop.
Listens to an UDP port and logs received messages
var dgram = require('dgram');
var server = dgram.createSocket('udp4', function (msg, rinfo) {
console.log(msg.toString());
});
server.bind(8125);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment