Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 test
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 LICENSE
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 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

Something went wrong with that request. Please try again.