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

[whatwg] WebSocket bufferedAmount includes overhead or not.

From: Fumitoshi Ukai <ukai@chromium.org>
Date: Thu, 4 Mar 2010 11:42:01 +0900
Message-ID: <de17d48e1003031842p7bd175dev8b09819a8385e8f7@mail.gmail.com>
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.htm>
Received on Wednesday, 3 March 2010 18:42:01 UTC

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