[Bug 17262] send function should have async interface

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17262

--- Comment #14 from Takashi Toyoshima <toyoshim@chromium.org> 2012-06-04 08:44:34 UTC ---
(In reply to comment #10)
> ghe point of the bufferedAmount property is to be able to send low-latency
> data. For example in a game you want to send the game characters current
> position. bufferedAmount allows you to do this without filling up the send
> buffer so much that buffered data causes latency.

I don't think so. All things we can estimate from bufferedAmount is ratio
between sending data speed and actual network throughput.
Usually we should allocate another WebSocket channel for low latency
communication and application may want to attach an event timestamp. If
bufferedAmount was useful to know the latency, we had no way to avoid the
latency.

Anyway, we have no way to know if the following send operation cause internal
buffer overflow. Firefox implementation might be better one, but it never
resolve potential issue how JavaScript care about internal sending buffer
capability.

My original proposal referred to Blob. But this proposal is not only for
handling Blob. I think asynchronous sending API without any polling and
completion callback could not work. Of course we never want to have select() in
JavaScript.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 4 June 2012 08:46:38 UTC