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 ready promise and close reason #12

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Rename ready to opened
  • Loading branch information
jasnell committed Sep 28, 2023
commit 7c7dcfffa451199bf0dec0a665a58044dffaccfd
9 changes: 5 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ interface Socket {
readonly attribute ReadableStream readable;
readonly attribute WritableStream writable;

readonly attribute Promise<undefined> ready;
readonly attribute Promise<undefined> opened;

readonly attribute Promise<undefined> closed;
Promise<undefined> close(optional any reason);
Expand Down Expand Up @@ -156,10 +156,11 @@ The {{writable}} attribute is a {{WritableStream}} which sends data to the serve
</pre>
</div>

<h4 id="ready-attribute">ready</h4>
<h4 id="opened-attribute">opened</h4>

The {{ready}} attribute is a promise that is resolved when the socket connection has been
successfully established, or is rejected if the connection fails.
The {{opened}} attribute is a promise that is resolved when the socket connection has been
successfully established, or is rejected if the connection fails. For sockets use secure-transport,
the resolution of the {{opened}} promise indicates the completion of the secure handshake.

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

Expand Down