| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9e1f736 commit ef2a0bd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1615,6 +1615,7 @@ added: v8.4.0 | |||
| 1615 | 1615 | ||
| 1616 | 1616 | The `'timeout'` event is emitted when there is no activity on the Server for | |
| 1617 | 1617 | a given number of milliseconds set using `http2server.setTimeout()`. | |
| 1618 | + **Default:** 2 minutes. | ||
| 1618 | 1619 | ||
| 1619 | 1620 | #### server.close([callback]) | |
| 1620 | 1621 | <!-- YAML | |
@@ -1628,6 +1629,24 @@ Note that this is not analogous to restricting new requests since HTTP/2 | |||
| 1628 | 1629 | connections are persistent. To achieve a similar graceful shutdown behavior, | |
| 1629 | 1630 | consider also using [`http2session.close()`] on active sessions. | |
| 1630 | 1631 | ||
| 1632 | + #### server.setTimeout([msecs][, callback]) | ||
| 1633 | + <!-- YAML | ||
| 1634 | + added: v8.4.0 | ||
| 1635 | + --> | ||
| 1636 | + | ||
| 1637 | + * `msecs` {number} **Default:** `120000` (2 minutes) | ||
| 1638 | + * `callback` {Function} | ||
| 1639 | + * Returns: {Http2Server} | ||
| 1640 | + | ||
| 1641 | + Used to set the timeout value for http2 server requests, | ||
| 1642 | + and sets a callback function that is called when there is no activity | ||
| 1643 | + on the `Http2Server` after `msecs` milliseconds. | ||
| 1644 | + | ||
| 1645 | + The given callback is registered as a listener on the `'timeout'` event. | ||
| 1646 | + | ||
| 1647 | + In case of no callback function were assigned, a new `ERR_INVALID_CALLBACK` | ||
| 1648 | + error will be thrown. | ||
| 1649 | + | ||
| 1631 | 1650 | ### Class: Http2SecureServer | |
| 1632 | 1651 | <!-- YAML | |
| 1633 | 1652 | added: v8.4.0 | |
@@ -1728,6 +1747,7 @@ added: v8.4.0 | |||
| 1728 | 1747 | ||
| 1729 | 1748 | The `'timeout'` event is emitted when there is no activity on the Server for | |
| 1730 | 1749 | a given number of milliseconds set using `http2secureServer.setTimeout()`. | |
| 1750 | + **Default:** 2 minutes. | ||
| 1731 | 1751 | ||
| 1732 | 1752 | #### Event: 'unknownProtocol' | |
| 1733 | 1753 | <!-- YAML | |
@@ -1751,6 +1771,24 @@ Note that this is not analogous to restricting new requests since HTTP/2 | |||
| 1751 | 1771 | connections are persistent. To achieve a similar graceful shutdown behavior, | |
| 1752 | 1772 | consider also using [`http2session.close()`] on active sessions. | |
| 1753 | 1773 | ||
| 1774 | + #### server.setTimeout([msecs][, callback]) | ||
| 1775 | + <!-- YAML | ||
| 1776 | + added: v8.4.0 | ||
| 1777 | + --> | ||
| 1778 | + | ||
| 1779 | + * `msecs` {number} **Default:** `120000` (2 minutes) | ||
| 1780 | + * `callback` {Function} | ||
| 1781 | + * Returns: {Http2SecureServer} | ||
| 1782 | + | ||
| 1783 | + Used to set the timeout value for http2 secure server requests, | ||
| 1784 | + and sets a callback function that is called when there is no activity | ||
| 1785 | + on the `Http2SecureServer` after `msecs` milliseconds. | ||
| 1786 | + | ||
| 1787 | + The given callback is registered as a listener on the `'timeout'` event. | ||
| 1788 | + | ||
| 1789 | + In case of no callback function were assigned, a new `ERR_INVALID_CALLBACK` | ||
| 1790 | + error will be thrown. | ||
| 1791 | + | ||
| 1754 | 1792 | ### http2.createServer(options[, onRequestHandler]) | |
| 1755 | 1793 | <!-- YAML | |
| 1756 | 1794 | added: v8.4.0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments