Skip to content

Commit eb1564f

Browse files
committed
doc: add tls.convertALPNProtocols(protocols, out)
Add convertALPNProtocols() to doc/api/tls.md, since the source code actually exposes this method. Refs: 802a2e7
1 parent 9cc0195 commit eb1564f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/api/tls.md

+17
Original file line numberDiff line numberDiff line change
@@ -2332,6 +2332,23 @@ may include certificates loaded from the system store (if `--use-system-ca` is u
23322332
or loaded from a file indicated by `NODE_EXTRA_CA_CERTS`, use
23332333
[`tls.getCACertificates()`][].
23342334

2335+
## `tls.convertALPNProtocols(protocols, out)`
2336+
2337+
<!-- YAML
2338+
added: v6.0.0
2339+
-->
2340+
2341+
* `protocols`: {string\[]|Buffer\[]|TypedArray\[]|DataView\[]|Buffer|
2342+
TypedArray|DataView}
2343+
An array of strings, `Buffer`s, `TypedArray`s, or `DataView`s, or a
2344+
single `Buffer`, `TypedArray`, or `DataView` containing the supported ALPN
2345+
protocols. `Buffer`s should have the format `[len][name][len][name]...`
2346+
e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the
2347+
next protocol name. Passing an array is usually much simpler, e.g.
2348+
`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher
2349+
preference than those later.
2350+
* `out` {Object} A output variable supplied by users, in which the converted `protocols` result `out.ALPNProtocols`.
2351+
23352352
## `tls.DEFAULT_ECDH_CURVE`
23362353

23372354
<!-- YAML

0 commit comments

Comments
 (0)