summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-01-01 11:13:29 -0800
committerJames M Snell <jasnell@gmail.com>2018-01-03 11:29:43 -0800
commit060babd66524b6a3e4757bb2fe5b87ad567cdb40 (patch)
tree22a4d99a5f91fd9b976e8b2e293ecf7420f9a697 /doc
parentb25b1efa0a6801cdf3faea199a36e0e2cc489395 (diff)
downloadandroid-node-v8-060babd66524b6a3e4757bb2fe5b87ad567cdb40.tar.gz
android-node-v8-060babd66524b6a3e4757bb2fe5b87ad567cdb40.tar.bz2
android-node-v8-060babd66524b6a3e4757bb2fe5b87ad567cdb40.zip
http2: add initial support for originSet
Add new properties to `Http2Session` to identify alpnProtocol, and indicator about whether the session is TLS or not, and initial support for origin set (preparinng for `ORIGIN` frame support and the client-side `Pool` implementation. The `originSet` is the set of origins for which an `Http2Session` may be considered authoritative. Per the `ORIGIN` frame spec, the originSet is only valid on TLS connections, so this is only exposed when using a `TLSSocket`. PR-URL: https://github.com/nodejs/node/pull/17935 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/http2.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md
index e9b06a427c..f613072324 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -283,6 +283,18 @@ session.setTimeout(2000);
session.on('timeout', () => { /** .. **/ });
```
+#### http2session.alpnProtocol
+<!-- YAML
+added: REPLACEME
+-->
+
+* Value: {string|undefined}
+
+Value will be `undefined` if the `Http2Session` is not yet connected to a
+socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+will return the value of the connected `TLSSocket`'s own `alpnProtocol`
+property.
+
#### http2session.close([callback])
<!-- YAML
added: REPLACEME
@@ -340,6 +352,18 @@ added: v8.4.0
Will be `true` if this `Http2Session` instance has been destroyed and must no
longer be used, otherwise `false`.
+#### http2session.encrypted
+<!-- YAML
+added: REPLACEME
+-->
+
+* Value: {boolean|undefined}
+
+Value is `undefined` if the `Http2Session` session socket has not yet been
+connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+and `false` if the `Http2Session` is connected to any other kind of socket
+or stream.
+
#### http2session.goaway([code, [lastStreamID, [opaqueData]]])
<!-- YAML
added: REPLACEME
@@ -363,6 +387,17 @@ added: v8.4.0
A prototype-less object describing the current local settings of this
`Http2Session`. The local settings are local to *this* `Http2Session` instance.
+#### http2session.originSet
+<!-- YAML
+added: REPLACEME
+-->
+
+* Value: {string[]|undefined}
+
+If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+will return an Array of origins for which the `Http2Session` may be
+considered authoritative.
+
#### http2session.pendingSettingsAck
<!-- YAML
added: v8.4.0