Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    destroyerpublic

    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

    Keywords

    none

    install

    npm i destroyer

    Downloadslast 7 days

    3

    version

    0.0.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar