GeezerVison is showing github.com — doc: clarify http2 docs around class exports · nodejs/node@9a31fdc
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/http2.md +13Lines changed: 13 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -108,6 +108,11 @@ have occasion to work with the `Http2Session` object directly, with most |
108 | 108 | actions typically taken through interactions with either the `Http2Server` or |
109 | 109 | `Http2Stream` objects. |
110 | 110 |
|
| 111 | +User code will not create `Http2Session` instances directly. Server-side |
| 112 | +`Http2Session` instances are created by the `Http2Server` instance when a |
| 113 | +new HTTP/2 connection is received. Client-side `Http2Session` instances are |
| 114 | +created using the `http2.connect()` method. |
| 115 | + |
111 | 116 | #### `Http2Session` and Sockets |
112 | 117 |
|
113 | 118 | Every `Http2Session` instance is associated with exactly one [`net.Socket`][] or |
@@ -1510,6 +1515,10 @@ added: v8.4.0 |
1510 | 1515 |
|
1511 | 1516 | * Extends: {net.Server} |
1512 | 1517 |
|
| 1518 | +Instances of `Http2Server` are created using the `http2.createServer()` |
| 1519 | +function. The `Http2Server` class is not exported directly by the `http2` |
| 1520 | +module. |
| 1521 | + |
1513 | 1522 | #### Event: 'checkContinue' |
1514 | 1523 | <!-- YAML |
1515 | 1524 | added: v8.5.0 |
@@ -1617,6 +1626,10 @@ added: v8.4.0 |
1617 | 1626 |
|
1618 | 1627 | * Extends: {tls.Server} |
1619 | 1628 |
|
| 1629 | +Instances of `Http2SecureServer` are created using the |
| 1630 | +`http2.createSecureServer()` function. The `Http2SecureServer` class is not |
| 1631 | +exported directly by the `http2` module. |
| 1632 | + |
1620 | 1633 | #### Event: 'checkContinue' |
1621 | 1634 | <!-- YAML |
1622 | 1635 | added: v8.5.0 |
|