[whatwg] WebSocket bufferedAmount includes overhead or not

On 3/30/10 10:22 AM, Jonas Sicking wrote:
> Making it implementation dependent is likely to lead to website
> incompatibilities. Such as:
>
> ws = new WebSocket(...);
> ws.onopen = function() {
>    ws.send(someString);
>    if (ws.bufferedAmount>  X) {
>      doStuff();

Can bufferedAmount not change due to data actually hitting the network 
during the execution of this code?  As in, will all the someString data 
be buffered immediately after that send() call?

-Boris

Received on Tuesday, 30 March 2010 21:56:17 UTC