From 672879f406c5218e24b65a4c45d68d99bca1a4ac Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Wed, 7 Nov 2018 13:16:50 -0800 Subject: [PATCH] doc: use real protocol names in ALPN example PR-URL: https://github.com/nodejs/node/pull/24232 Reviewed-By: James M Snell --- doc/api/tls.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index 4f97bd2b32dfa2..3b0420eddc5251 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -888,9 +888,10 @@ changes: * `ALPNProtocols`: {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array} An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or `Uint8Array` containing the supported ALPN protocols. `Buffer`s should have - the format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the - first byte is the length of the next protocol name. Passing an array is - usually much simpler, e.g. `['hello', 'world']`. + the format `[len][name][len][name]...` e.g. `'\x08http/1.1\x08http/1.0'`, + where the `len` byte is the length of the next protocol name. Passing an + array is usually much simpler, e.g. `['http/1.1', 'http/1.0']`. + Protocols earlier in the list have higher preference than those later. * `servername`: {string} Server name for the SNI (Server Name Indication) TLS extension. It is the name of the host being connected to, and must be a host name, and not an IP address. It can be used by a multi-homed server to