Name Last Update
..
example Loading commit data...
test Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
index.js Loading commit data...
package.json Loading commit data...
readme.markdown Loading commit data...

destroyer

destroy network servers for when .close() is not enough

build status

example

var destroyer = require('destroyer');
var net = require('net');

var server = net.createServer();
var destroy = destroyer(server);
server.listen(5000);

setTimeout(destroy, 4000);

methods

var destroyer = require('destroyer')

var destroy = destroyer(server)

Return a new function destroy() that will close the server and destroy all its active connections.

http.createServer() and net.createServer() servers both work.

install

With npm do:

npm install destroyer

license

MIT