Re: WebSockets questions, bufferedAmount

On 2/20/10 11:40 PM, Ian Hickson wrote:
> On Fri, 19 Feb 2010, Olli Pettay wrote:
>> On 2/19/10 5:09 AM, Ian Hickson wrote:
>>> On Fri, 19 Feb 2010, Wellington Fernando de Macedo wrote:
>> Frame boundary bits are taken account in bufferedAmount?
>> This is surprising. Very surprising.
>> Web Socket API is about the API, so it is a bit strange that
>> whoever uses that API needs to know that because of the (current)
>> protocol, something extra is added to the bufferedAmount.
>> Very strange indeed.
> I'm happy to do it the other way around. I basically spec whatever you
> (the browser vendors) want, all you have to do is ask. :-)

Well, I propose that bufferedAmount doesn't take account the bits added
by the protocol. This way if the protocol is later changed, web
developers don't need to change their code because of the way they
rely on bufferedAmount.
And I assume that most web developers won't read the protocol spec.
They'll probably just use the API and on server side some helper
methods so they know pretty much nothing about the protocol.

And XHR+progress events report only the size of the data.
(Though, seems like XHR doesn't actually define that in a way Progress 
Events draft requires.)


Received on Monday, 22 February 2010 10:17:35 UTC