Skip to content

Instantly share code, notes, and snippets.

@timoxley
Created January 17, 2012 20:13
Show Gist options
  • Save timoxley/1628627 to your computer and use it in GitHub Desktop.
Save timoxley/1628627 to your computer and use it in GitHub Desktop.
dnode-close-test.js
var dnode = require('dnode')
var upnode = require('upnode')
var server = dnode({})
server.use(upnode.ping)
server.listen(5000)
var client = upnode.connect(5000)
client(function(remote, connection) {
console.log('connected', arguments)
connection.on('end', function() {
console.log('connection ended', arguments)
})
server.close()
server.end()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment