[whatwg] WebSocket bufferedAmount includes overhead or not.

Fumitoshi Ukai (鵜飼文敏) ukai at chromium.org
Wed Mar 3 18:42:01 PST 2010


Hi,

I noticed that WebSocket spec updated to not inlcude framing overhead in
bufferedAmount.
http://lists.whatwg.org/pipermail/commit-watchers-whatwg.org/2010/003971.html
I tried to implement it in WebKit, but found it make hard to implement
correctly. https://bugs.webkit.org/show_bug.cgi?id=35571
It's easy after WebSocket is closed (just add length of message), but while
it's open, we'll manage buffer including frame bytes and underlying socket
will write arbitrary length of the buffer (may not be on frame boundary)
To get bufferdAmount correctly without framing overhead, we need to parse
the buffer again.  It's not light operation and it's challenge to make it
effective.
I think including frame overhead is much easier.
Could you revert it?

-- 
Fumitoshi Ukai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100304/aa17036f/attachment-0002.htm>


More information about the whatwg mailing list