W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2010

[whatwg] WebSocket bufferedAmount includes overhead or not

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 31 Mar 2010 00:56:17 -0400
Message-ID: <4BB2D5F1.3060106@mit.edu>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC