Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The WebSocketStream Interface#48

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ricea wants to merge33 commits intomain
base:main
Choose a base branch
Loading
fromadd-websocketstream
Open
Changes from1 commit
Commits
Show all changes
33 commits
Select commitHold shift + click to select a range
579e413
[WIP] The WebSocketStream Interface
riceaNov 11, 2021
3c4803b
Fix grammatical errors
riceaJan 23, 2024
8e5f06b
Note that backpressure is obeyed for writable
riceaJan 23, 2024
5cb355b
Remove mention of passing close code or reason to abort() or cancel()
riceaJan 23, 2024
1f9a2d6
Revert "Remove mention of passing close code or reason to abort() or …
riceaJan 28, 2024
96baeed
Mention that it has to be a WebSocketError
riceaJan 28, 2024
69bae4f
Add IDL for WebSocketError
riceaJan 28, 2024
fa5ff83
Add algorithm steps for WebSocketStream and WebSocketError
riceaJan 28, 2024
adf4bbe
Changes from reviews
riceaJan 30, 2024
f488ee4
Add missing AbortSignal algorithm steps.
riceaJan 30, 2024
b1a58f4
Use Bikeshed magic to get a URL record
riceaJan 31, 2024
8cc184c
Add missing colon
riceaJan 31, 2024
7812163
Remove "the user agent must run..."
riceaJan 31, 2024
47ab0da
Fix capitalisation of "close"
riceaJan 31, 2024
2b9ee80
Server can't send a bad reason, and wording improvement (by @domenic)
riceaJan 31, 2024
12ff404
Editorial changes from @domenic. Also change `closeCode` to [EnforceR…
riceaJan 31, 2024
a2fc7c2
Change `|this|` to `[=this=]` everywhere
riceaJan 31, 2024
3a285c7
Fix initialization of dictionaries and WebSocketErrors
riceaJan 31, 2024
397dd00
Demote "Feedback from the protocol" and "The CloseEvent interface"
riceaJan 31, 2024
9e8d8f7
Indent "Garbage Collection" and fix the WebSocketStream interface ena…
riceaFeb 1, 2024
673ace9
Use "queue a global task"
riceaFeb 6, 2024
30f5f8b
Explicitly say what realm write algorithm's promise is created in
riceaFeb 6, 2024
7d85772
Add more <hr>s
riceaFeb 6, 2024
1d7d868
Place The WebSocket Protocol in <cite> tags
riceaFeb 6, 2024
7b81f79
Fix many small nits from domenic@'s review
riceaFeb 6, 2024
6da74e7
Add a missing comma
riceaFeb 21, 2024
16a75fe
Fix description of "was ever connected"
riceaFeb 21, 2024
2bd7ad5
Fix grammar in developer notes
riceaFeb 21, 2024
b2e001c
Apply cleanups by @domenic.
riceaFeb 21, 2024
1e2eae9
Fixes requested by @domenic
riceaFeb 21, 2024
24f24f8
Fix Bikeshed compile error
riceaFeb 21, 2024
a6d426f
Set defaults for WebSocketError's closeCode and reason
riceaFeb 21, 2024
d5570f3
Add default arguments
riceaMar 28, 2024
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
PrevPrevious commit
NextNext commit
Demote "Feedback from the protocol" and "The CloseEvent interface"
Make those headings be indented under "The WebSocket interface" for amore logical organisation.Also move "Ping and Pong frames" section to the bottom as it applies toboth APIs.
  • Loading branch information
@ricea
ricea committedJan 31, 2024
commit397dd0021d5dd1a74e0eb619bba38d0d3388f368
37 changes: 20 additions & 17 deletionsindex.bs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -495,7 +495,7 @@ that must be supported, as [=event handler IDL attributes=], by all objects impl
</table>


# Feedback from the protocol # {#feedback-from-the-protocol}
## Feedback from the protocol## {#feedback-from-the-protocol}

When [=the WebSocket connection is established=], the user agent must [=queue a task=] to run these
steps:
Expand DownExpand Up@@ -636,23 +636,8 @@ The [=task source=] for all [=tasks=] <a lt="queue a task">queued</a> in this se
<dfn export>WebSocket task source</dfn>.


# Ping and Pong frames # {#ping-and-pong-frames}

<cite>The WebSocket protocol</cite> defines Ping and Pong frames that can be used for keep-alive,
heart-beats, network status probing, latency instrumentation, and so forth. These are not currently
exposed in the API.

User agents may send ping and unsolicited pong frames as desired, for example in an attempt to
maintain local network NAT mappings, to detect failed connections, or to display latency metrics to
the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed that
servers will solicit pongs whenever appropriate for the server's needs.

<!-- v2: we'll probably add a way to make the client send pings and automatically terminate the
connection if they don't get a pong within an author-provided timeout; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17264 -->


# The {{CloseEvent}} interface # {#the-closeevent-interface}
## The {{CloseEvent}} interface ## {#the-closeevent-interface}

{{WebSocket}} objects use the {{CloseEvent}} interface for their {{WebSocket/close}} events:

Expand DownExpand Up@@ -1303,6 +1288,24 @@ To <dfn>close the WebSocket</dfn> for a {WebSocket} or {WebSocketStream} [=this=
{{WebSocketStream/closed}} promise will resolve, depending on the type of [=this=].
</dl>


# Ping and Pong frames # {#ping-and-pong-frames}

<cite>The WebSocket protocol</cite> defines Ping and Pong frames that can be used for keep-alive,
heart-beats, network status probing, latency instrumentation, and so forth. These are not currently
exposed in the API.

User agents may send ping and unsolicited pong frames as desired, for example in an attempt to
maintain local network NAT mappings, to detect failed connections, or to display latency metrics to
the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed that
servers will solicit pongs whenever appropriate for the server's needs.

<!-- v2: we'll probably add a way to make the client send pings and automatically terminate the
connection if they don't get a pong within an author-provided timeout; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17264 -->



<h2 id="acks" class="no-num">Acknowledgments</h2>

Until the creation of this standard in 2021, the text here was maintained in the <a
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp