[whatwg] WebSocket bufferedAmount includes overhead or not

On Thu, 25 Mar 2010 16:35:19 +0100, Olli Pettay <Olli.Pettay at helsinki.fi>  
wrote:
> On 3/25/10 4:25 PM, Niklas Beischer wrote:
>> Easy. The bufferedAmount is: "The amount of bytes waiting to be
>> transferred, including protocol overhead".
> That doesn't define exactly what the bufferedAmount means and what
> kinds of values are expected.
> What I'd expect the API to tell me is, for example, that if I call
> ws.send(foo), and nothing is yet sent over the network, what is the
> exact value of bufferedAmount.
> Again, I'd really wish to keep the API to work reasonable similar
> way as XHR+progress events where protocol overhead isn't reported.

Why? Progress events are completely different from this. This is about not  
saturating the network with too much data; it makes sense if the actual  
amount of data that is going to hit the network is known. (Yes, I changed  
my mind.)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Thursday, 25 March 2010 08:55:32 UTC