@atsushi_suzuki/http-graceful-close
v0.0.2
Published
gracefully close http server with keep-alive connections
Downloads
9
Maintainers
Readme
http-graceful-close
gracefully close http server with keep-alive connections.
API
var gracefulHttp = require('http-graceful-close');
gracefulHttp.install(server: http.Server)
Install Server.gracefulClose
to given server instance.
This must be called before first listen
.
gracefulHttp.createServer(listener: Function): http.Server
new gracefulHttp.Server(options: Object)
Wrapper of http
methods.
server.gracefulClose(listener?: Function)
- Close listening socket by
Server.close
- If there is request with headers not sent, set
Connection: close
- Or wait for 400ms timeout and destroy connection