[whatwg] WebSocket bufferedAmount includes overhead or not
Boris Zbarsky
bzbarsky at MIT.EDU
Thu Apr 1 20:15:09 PDT 2010
On 3/31/10 6:57 PM, Jonas Sicking wrote:
> I would expect that send() is allowed to start streaming data over the
> network as soon as it can, but only update bufferedAmount from the
> event loop.
Maybe I'm not being clear. Let's say bufferedAmount were to reflect the
number of UTF-8-encoded bytes to be sent, for the sake of argument.
I wait until bufferedAmount is 0, then call send("My text").
What are possible values of bufferedAmount if I examine it right after
the send() call? Is 0 a valid possible value? What about 1? 2? 3? 4?
5? 6? 7?
Presumably the value will be somewhere in the integer range [0,7],
right? Or will it always be 7 after that call in that situation?
-Boris
More information about the whatwg
mailing list