| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 82b56b6 commit 88d4794
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1544,6 +1544,18 @@ added: v8.4.0 | |||
| 1544 | 1544 | The `'timeout'` event is emitted when there is no activity on the Server for | |
| 1545 | 1545 | a given number of milliseconds set using `http2server.setTimeout()`. | |
| 1546 | 1546 | ||
| 1547 | + #### server.close([callback]) | ||
| 1548 | + <!-- YAML | ||
| 1549 | + added: v8.4.0 | ||
| 1550 | + --> | ||
| 1551 | + - `callback` {Function} | ||
| 1552 | + | ||
| 1553 | + Stops the server from accepting new connections. See [`net.Server.close()`][]. | ||
| 1554 | + | ||
| 1555 | + Note that this is not analogous to restricting new requests since HTTP/2 | ||
| 1556 | + connections are persistent. To achieve a similar graceful shutdown behavior, | ||
| 1557 | + consider also using [`http2session.close()`] on active sessions. | ||
| 1558 | + | ||
| 1547 | 1559 | ### Class: Http2SecureServer | |
| 1548 | 1560 | <!-- YAML | |
| 1549 | 1561 | added: v8.4.0 | |
@@ -1651,6 +1663,18 @@ negotiate an allowed protocol (i.e. HTTP/2 or HTTP/1.1). The event handler | |||
| 1651 | 1663 | receives the socket for handling. If no listener is registered for this event, | |
| 1652 | 1664 | the connection is terminated. See the [Compatibility API][]. | |
| 1653 | 1665 | ||
| 1666 | + #### server.close([callback]) | ||
| 1667 | + <!-- YAML | ||
| 1668 | + added: v8.4.0 | ||
| 1669 | + --> | ||
| 1670 | + - `callback` {Function} | ||
| 1671 | + | ||
| 1672 | + Stops the server from accepting new connections. See [`tls.Server.close()`][]. | ||
| 1673 | + | ||
| 1674 | + Note that this is not analogous to restricting new requests since HTTP/2 | ||
| 1675 | + connections are persistent. To achieve a similar graceful shutdown behavior, | ||
| 1676 | + consider also using [`http2session.close()`] on active sessions. | ||
| 1677 | + | ||
| 1654 | 1678 | ### http2.createServer(options[, onRequestHandler]) | |
| 1655 | 1679 | <!-- YAML | |
| 1656 | 1680 | added: v8.4.0 | |
@@ -3126,7 +3150,9 @@ following additional properties: | |||
| 3126 | 3150 | [`http2.createSecureServer()`]: #http2_http2_createsecureserver_options_onrequesthandler | |
| 3127 | 3151 | [`http2.Server`]: #http2_class_http2server | |
| 3128 | 3152 | [`http2.createServer()`]: #http2_http2_createserver_options_onrequesthandler | |
| 3153 | + [`http2session.close()`]: #http2_http2session_close_callback | ||
| 3129 | 3154 | [`http2stream.pushStream()`]: #http2_http2stream_pushstream_headers_options_callback | |
| 3155 | + [`net.Server.close()`]: net.html#net_server_close_callback | ||
| 3130 | 3156 | [`net.Socket`]: net.html#net_class_net_socket | |
| 3131 | 3157 | [`net.Socket.prototype.ref`]: net.html#net_socket_ref | |
| 3132 | 3158 | [`net.Socket.prototype.unref`]: net.html#net_socket_unref | |
@@ -3139,6 +3165,7 @@ following additional properties: | |||
| 3139 | 3165 | [`response.write(data, encoding)`]: http.html#http_response_write_chunk_encoding_callback | |
| 3140 | 3166 | [`response.writeContinue()`]: #http2_response_writecontinue | |
| 3141 | 3167 | [`response.writeHead()`]: #http2_response_writehead_statuscode_statusmessage_headers | |
| 3168 | + [`tls.Server.close()`]: tls.html#tls_server_close_callback | ||
| 3142 | 3169 | [`tls.TLSSocket`]: tls.html#tls_class_tls_tlssocket | |
| 3143 | 3170 | [`tls.connect()`]: tls.html#tls_tls_connect_options_callback | |
| 3144 | 3171 | [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener | |
| Back | FazBrowse Home | New Git URL |
0 commit comments