Skip to content

Commit e584cc5

Browse files
sam-githubBridgeAR
authored andcommitted
doc: use real protocol names in ALPN example
PR-URL: #24232 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f8ed673 commit e584cc5

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
@@ -903,9 +903,10 @@ changes:
903903
An array of strings, `Buffer`s or `TypedArray`s or `DataView`s, or a
904904
single `Buffer` or `TypedArray` or `DataView` containing the supported ALPN
905905
protocols. `Buffer`s should have the format `[len][name][len][name]...`
906-
e.g. `0x05hello0x05world`, where the first byte is the length of the next
907-
protocol name. Passing an array is usually much simpler, e.g.
908-
`['hello', 'world']`.
906+
e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the
907+
next protocol name. Passing an array is usually much simpler, e.g.
908+
`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher
909+
preference than those later.
909910
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS
910911
extension. It is the name of the host being connected to, and must be a host
911912
name, and not an IP address. It can be used by a multi-homed server to

0 commit comments

Comments
 (0)