Skip to content

Commit

Permalink
Merge pull request #1794 from w3c/buffered-amount-slot
Browse files Browse the repository at this point in the history
Buffered amount slot
  • Loading branch information
aboba authored Mar 15, 2018
2 parents fccfb55 + 2a674e4 commit f361fd3
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -8288,6 +8288,10 @@ <h2>Methods</h2>
<p>Let <var>channel</var> have a <dfn>[[\ReadyState]]</dfn> internal slot
initialized to <code>"connecting"</code>.</p>
</li>
<li>
<p>Let <var>channel</var> have a <dfn>[[\BufferedAmount]]</dfn>
internal slot initialized to <code>0</code>.</p>
</li>
<li>
<p>Let <var>channel</var> have a <dfn>[[\MaxRetransmits]]</dfn> internal slot
initialized to <var>option</var>'s <code>maxRetransmits</code>
Expand Down Expand Up @@ -8892,7 +8896,9 @@ <h2>Attributes</h2>
<dd>
<p>The <dfn id=
"dom-datachannel-bufferedamount"><code>bufferedAmount</code></dfn>
attribute MUST return the number of bytes of application data
attribute MUST, on getting, return the value of the
<a>[[\BufferedAmount]]</a> slot. The attribute exposes the number
of bytes of application data
(UTF-8 text and binary data) that have been queued using
<code><a data-link-for="RTCDataChannel">send()</a></code> but that, as
of the last time the event loop started executing a task, had not
Expand All @@ -8901,11 +8907,16 @@ <h2>Attributes</h2>
whether the user agent is able to transmit text asynchronously
with script execution.) This does not include framing overhead
incurred by the protocol, or buffering done by the operating
system or network hardware. This attribute's value will only
system or network hardware. The value of the
<a>[[\BufferedAmount]]</a> slot will only
increase with each call to the <code><a data-link-for=
"RTCDataChannel">send()</a></code> method as long as the <a>
[[\ReadyState]]</a> slot is <code>open</code>. However, the
attribute does not reset to zero once the channel closes.</p>
[[\ReadyState]]</a> slot is <code>open</code>; however, the
slot does not reset to zero once the channel closes. When the
<a>underlying data transport</a> sends data from its queue, the
user agent MUST queue a task that reduces
<a>[[\BufferedAmount]]</a> with the number of bytes that was
sent.</p>
</dd>
<dt><code>bufferedAmountLowThreshold</code> of type <span class=
"idlAttrType"><a>unsigned long</a></span></dt>
Expand Down Expand Up @@ -9120,32 +9131,29 @@ <h2>Dictionary <dfn>RTCDataChannelInit</dfn> Members</h2>
<p><code>string</code> object:</p>
<p>Let <var>data</var> be a byte buffer that represents the
result of encoding the method's argument as UTF-8 and increase the
<code><a data-link-for="RTCDataChannel">bufferedAmount</a></code>
attribute with the length of <var>data</var>.</p>
value of the <a>[[\BufferedAmount]]</a> slot with the length of
<var>data</var>.</p>
</li>
<li>
<p><code>Blob</code> object:</p>
<p>Let <var>data</var> be the raw data represented by the
<code>Blob</code> object and increase the <code><a data-link-for=
"RTCDataChannel">bufferedAmount</a></code> attribute by the size
of data, in bytes.</p>
<code>Blob</code> object and increase the value of the
<a>[[\BufferedAmount]]</a> slot with the size of data, in bytes.</p>
</li>
<li>
<p><code>ArrayBuffer</code> object:</p>
<p>Let <var>data</var> be the data stored in the buffer described
by the <code>ArrayBuffer</code> object and increase the
<code><a data-link-for="RTCDataChannel">bufferedAmount</a></code>
attribute by the length of the <code>ArrayBuffer</code> in
bytes.</p>
by the <code>ArrayBuffer</code> object and increase the value of
the <a>[[\BufferedAmount]]</a> slot with the the length of the
<code>ArrayBuffer</code> in bytes.</p>
</li>
<li>
<p><code>ArrayBufferView</code> object:</p>
<p>Let <var>data</var> be the data stored in the section of the
buffer described by the <code>ArrayBuffer</code> object that the
<code>ArrayBufferView</code> object references and increase the
<code><a data-link-for="RTCDataChannel">bufferedAmount</a></code>
attribute by the length of the <code>ArrayBufferView</code> in
bytes.</p>
value of the <a>[[\BufferedAmount]]</a> slot with the the length
of the <code>ArrayBufferView</code> in bytes.</p>
</li>
</ul>
</li>
Expand Down

0 comments on commit f361fd3

Please sign in to comment.