Skip to content

Commit 8e5f06b

Browse files
committed
Note that backpressure is obeyed for writable
Temporarily force-link "writable stream writer" until it can be exported from the streams standard.
1 parent 3c4803b commit 8e5f06b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.bs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ spec:html; type:dfn;
3434
spec:url; type:dfn;
3535
text:origin
3636
for:/; text:url
37+
spec:streams; type:dfn
38+
text:writable stream writer
3739
</pre>
3840

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

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

0 commit comments

Comments
 (0)