Skip to content

Commit 672879f

Browse files
sam-githubcodebytere
authored andcommitted
doc: use real protocol names in ALPN example
PR-URL: #24232 Reviewed-By: James M Snell <[email protected]>
1 parent fbf5321 commit 672879f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/tls.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,10 @@ changes:
888888
* `ALPNProtocols`: {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
889889
An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or
890890
`Uint8Array` containing the supported ALPN protocols. `Buffer`s should have
891-
the format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
892-
first byte is the length of the next protocol name. Passing an array is
893-
usually much simpler, e.g. `['hello', 'world']`.
891+
the format `[len][name][len][name]...` e.g. `'\x08http/1.1\x08http/1.0'`,
892+
where the `len` byte is the length of the next protocol name. Passing an
893+
array is usually much simpler, e.g. `['http/1.1', 'http/1.0']`.
894+
Protocols earlier in the list have higher preference than those later.
894895
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS
895896
extension. It is the name of the host being connected to, and must be a host
896897
name, and not an IP address. It can be used by a multi-homed server to

0 commit comments

Comments
 (0)