From 600145f796382307d5e9f74539733516401443ed Mon Sep 17 00:00:00 2001 From: Adam Bergkvist Date: Thu, 8 Mar 2018 15:11:48 +0100 Subject: [PATCH 1/3] RTCDataChannel: Use internal slot for bufferedAmount --- webrtc.html | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/webrtc.html b/webrtc.html index a257be565..3e7495fda 100644 --- a/webrtc.html +++ b/webrtc.html @@ -8288,6 +8288,10 @@

Methods

Let channel have a [[\ReadyState]] internal slot initialized to "connecting".

+
  • +

    Let channel have a [[\BufferedAmount]] + internal slot initialized to 0.

    +
  • Let channel have a [[\MaxRetransmits]] internal slot initialized to option's maxRetransmits @@ -8892,7 +8896,9 @@

    Attributes

    The bufferedAmount - attribute MUST return the number of bytes of application data + attribute MUST, on getting, return the value of the + [[\BufferedAmount]] slot. The attribute exposes the number + of bytes of application data (UTF-8 text and binary data) that have been queued using send() but that, as of the last time the event loop started executing a task, had not @@ -8901,11 +8907,12 @@

    Attributes

    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 + [[\BufferedAmount]] slot will only increase with each call to the send() method as long as the - [[\ReadyState]] slot is open. However, the - attribute does not reset to zero once the channel closes.

    + [[\ReadyState]] slot is open; however, the + slot does not reset to zero once the channel closes.

    bufferedAmountLowThreshold of type unsigned long
    @@ -9119,33 +9126,30 @@

    Dictionary RTCDataChannelInit Members

  • string object:

    Let data be a byte buffer that represents the - result of encoding the method's argument as UTF-8 and increase the - bufferedAmount - attribute with the length of data.

    + result of encoding the methods argument as UTF-8 and increase the + value of the [[\BufferedAmount]] slot with the length of + data.

  • Blob object:

    Let data be the raw data represented by the - Blob object and increase the bufferedAmount attribute by the size - of data, in bytes.

    + Blob object and increase the value of the + [[\BufferedAmount]] slot with the size of data, in bytes.

  • ArrayBuffer object:

    Let data be the data stored in the buffer described - by the ArrayBuffer object and increase the - bufferedAmount - attribute by the length of the ArrayBuffer in - bytes.

    + by the ArrayBuffer object and increase the value of + the [[\BufferedAmount]] slot with the the length of the + ArrayBuffer in bytes.

  • ArrayBufferView object:

    Let data be the data stored in the section of the buffer described by the ArrayBuffer object that the ArrayBufferView object references and increase the - bufferedAmount - attribute by the length of the ArrayBufferView in - bytes.

    + value of the [[\BufferedAmount]] slot with the the length + of the ArrayBufferView in bytes.

  • From 559e5c854667971d5ba481927a69d02fb4fde40d Mon Sep 17 00:00:00 2001 From: Adam Bergkvist Date: Thu, 15 Mar 2018 15:15:50 +0100 Subject: [PATCH 2/3] RTCDataChannel: Specify how buffered amount is reduced --- webrtc.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webrtc.html b/webrtc.html index 3e7495fda..87a619e59 100644 --- a/webrtc.html +++ b/webrtc.html @@ -8912,7 +8912,11 @@

    Attributes

    increase with each call to the send() method as long as the [[\ReadyState]] slot is open; however, the - slot does not reset to zero once the channel closes.

    + slot does not reset to zero once the channel closes. When the + underlying data transport sends data from its queue, the + user agent MUST queue a task that reduces + [[\BufferedAmount]] with the number of bytes that was + sent.

    bufferedAmountLowThreshold of type unsigned long
    From 2a674e4f27193b09c33b543bb2cf731a4f141da1 Mon Sep 17 00:00:00 2001 From: Bernard Aboba Date: Thu, 15 Mar 2018 07:39:20 -0700 Subject: [PATCH 3/3] Missing apostrophe --- webrtc.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc.html b/webrtc.html index 87a619e59..c3276c02b 100644 --- a/webrtc.html +++ b/webrtc.html @@ -9130,7 +9130,7 @@

    Dictionary RTCDataChannelInit Members

  • string object:

    Let data be a byte buffer that represents the - result of encoding the methods argument as UTF-8 and increase the + result of encoding the method's argument as UTF-8 and increase the value of the [[\BufferedAmount]] slot with the length of data.