destroy network servers for when .close() is not enough
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
test
.travis.yml
LICENSE
index.js
package.json
readme.markdown

readme.markdown

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