Skip to content

Commit 2b897c8

Browse files
committed
doc: use real protocol names in ALPN example
1 parent 8884a98 commit 2b897c8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

doc/api/tls.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,10 @@ changes:
902902
An array of strings, `Buffer`s or `TypedArray`s or `DataView`s, or a
903903
single `Buffer` or `TypedArray` or `DataView` containing the supported ALPN
904904
protocols. `Buffer`s should have the format `[len][name][len][name]...`
905-
e.g. `0x05hello0x05world`, where the first byte is the length of the next
906-
protocol name. Passing an array is usually much simpler, e.g.
907-
`['hello', 'world']`.
905+
e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the
906+
next protocol name. Passing an array is usually much simpler, e.g.
907+
`['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher
908+
preference than those later.
908909
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS
909910
extension. It must be a host name, and not an IP address.
910911
* `checkServerIdentity(servername, cert)` {Function} A callback function

0 commit comments

Comments
 (0)