Skip to content

Commit

Permalink
Merge pull request #18 from mmastrac/alpn_sni
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell authored Oct 28, 2023
2 parents 34cb571 + 52680fc commit 9302e53
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ The terms {{ReadableStream}} and {{WritableStream}} are defined in [[WHATWG-STRE

<h3 id="attributes">Attributes</h3>

<h4 id="info-attribute">info</h4>

The {{info}} attribute is a {{SocketInfo}} which contains information about the state of the socket.

<h4 id="readable-attribute">readable</h4>

The {{readable}} attribute is a {{ReadableStream}} which receives data from the server the socket is connected to.
Expand Down Expand Up @@ -322,6 +326,18 @@ At any point during the creation of the {{Socket}} instance, `connect` may throw
<dd>Initially the same as the `off` option, the connection continues in plain text until the {{startTls()}} method is called</dd>
</dl>
</dd>
<dt>
{{alpn}} member
</dt>
<dd>
The Application-Layer Protocol Negotiation list to send, as an array of strings. If the server agrees with one of the protocols specified in this list, it will return the matching protocol in the {{info}} property. May be specified if and only if {{secureTransport}} is `on` or `starttls`.
</dd>
<dt>
{{sni}} member
</dt>
<dd>
The Server Name Indication TLS option to send as part of the TLS handshake. If specified, requests that the server send a certificate with a matching common name. May be specified if and only if {{secureTransport}} is `on` or `starttls`.
</dd>
<dt>
{{allowHalfOpen}} member
</dt>
Expand Down Expand Up @@ -353,6 +369,12 @@ At any point during the creation of the {{Socket}} instance, `connect` may throw
<dd>
Optionally provides the hostname/port combo of the local network endpoint, for example `"localhost:12345"`.
</dd>
<dt>
{{alpn}} property
</dt>
<dd>
If the server agrees with one of the protocols specified in the `alpn` negotiation list, returns that protocol name as a string, otherwise `null`.
</dd>
</d1>

<h3 id="anysocketaddress-type">`AnySocketAddress` type</h3>
Expand Down

0 comments on commit 9302e53

Please sign in to comment.