Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SocketInfo and alpn/sni negotiation #18

Merged
merged 2 commits into from
Oct 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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