Skip to content

Commit 5f36f5c

Browse files
committed
Add SocketInfo and alpn/sni negotiation
1 parent 34cb571 commit 5f36f5c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

index.bs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ The terms {{ReadableStream}} and {{WritableStream}} are defined in [[WHATWG-STRE
113113

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

116+
<h4 id="info-attribute">info</h4>
117+
118+
The {{info}} attribute is a {{SocketInfo}} which contains information about the state of the socket.
119+
116120
<h4 id="readable-attribute">readable</h4>
117121

118122
The {{readable}} attribute is a {{ReadableStream}} which receives data from the server the socket is connected to.
@@ -322,6 +326,18 @@ At any point during the creation of the {{Socket}} instance, `connect` may throw
322326
<dd>Initially the same as the `off` option, the connection continues in plain text until the {{startTls()}} method is called</dd>
323327
</dl>
324328
</dd>
329+
<dt>
330+
{{alpn}} member
331+
</dt>
332+
<dd>
333+
The Application-Layer Protocol Negotiation list to send. 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`.
334+
</dd>
335+
<dt>
336+
{{sni}} member
337+
</dt>
338+
<dd>
339+
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`.
340+
</dd>
325341
<dt>
326342
{{allowHalfOpen}} member
327343
</dt>
@@ -353,6 +369,12 @@ At any point during the creation of the {{Socket}} instance, `connect` may throw
353369
<dd>
354370
Optionally provides the hostname/port combo of the local network endpoint, for example `"localhost:12345"`.
355371
</dd>
372+
<dt>
373+
{{alpn}} property
374+
</dt>
375+
<dd>
376+
If the server agrees with one of the protocols specified in the `alpn` negotiation list, returns that protocol name as a string, otherwise `null`.
377+
</dd>
356378
</d1>
357379

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

0 commit comments

Comments
 (0)