Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis bnoordhuis/test-dgram-bind.js Secret
Created Jan 26, 2012

Embed
What would you like to do?
var dgram = require('dgram');
var a = dgram.createSocket('udp4');
a.on('message', function(m) {
console.log('a received ' + m);
});
a.bind(8000, '127.0.0.1');
var b = dgram.createSocket('udp4');
b.on('message', function(m) {
console.log('b received ' + m);
});
b.bind(8000, '127.0.0.1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.