Skip to content

Commit

Permalink
Note that backpressure is obeyed for writable
Browse files Browse the repository at this point in the history
Temporarily force-link "writable stream writer" until it can be exported
from the streams standard.
  • Loading branch information
ricea committed Jan 23, 2024
1 parent 7299740 commit c07c6fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ spec:html; type:dfn;
spec:url; type:dfn;
text:origin
for:/; text:url
spec:streams; type:dfn
text:writable stream writer
</pre>

<pre class=anchors>
Expand Down Expand Up @@ -886,7 +888,10 @@ initially unset.
: {{WebSocketOpenInfo/writable}}
:: A {{WritableStream}} that can be used to send messages to the server. Each chunk written will
be converted to one message. Strings will be sent as text messages; {{BufferSource}} chunks will
be sent as binary messages.
be sent as binary messages. Backpressure due to the network or server being behind will
automatically be observed by piping. When using a [=writable stream writer=], waiting for the
{{WritableStreamDefaultWriter/ready|writer.ready}} promise will ensure that backpressure is
obeyed.

The WebSocket can be closed by calling {{WritableStream/close()}} on
{{WebSocketOpenInfo/writable}}.
Expand Down

0 comments on commit c07c6fd

Please sign in to comment.