PIbd-21_Yaruskin_S.A_IP/лаб2/node_modules/server-destroy
2024-01-06 02:30:45 +04:00
..
index.js all commit 2024-01-06 02:30:45 +04:00
LICENSE all commit 2024-01-06 02:30:45 +04:00
package.json all commit 2024-01-06 02:30:45 +04:00
README.md all commit 2024-01-06 02:30:45 +04:00
test.js all commit 2024-01-06 02:30:45 +04:00

server-destroy

Enable destroying a server, and all currently open connections.

Usage

var enableDestroy = require('server-destroy');

var server = http.createServer(function(req, res) {
  // do stuff, blah blah blah
});

server.listen(PORT);

// enhance with a 'destroy' function
enableDestroy(server);

// some time later...
server.destroy();