Skip to content

Instantly share code, notes, and snippets.

@rsolomo
Created February 3, 2014 06:33
Show Gist options
  • Save rsolomo/8779643 to your computer and use it in GitHub Desktop.
Save rsolomo/8779643 to your computer and use it in GitHub Desktop.
udp listener in node.js
var dgram = require('dgram')
var socket = dgram.createSocket('udp4')
socket.on('message', function(msg) {
console.log(msg.toString())
})
socket.bind(5514, '127.0.0.1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment