- From: <bugzilla@jessica.w3.org>
- Date: Thu, 15 Dec 2011 13:20:43 +0000
- To: public-webapps@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15210 Summary: Consider dispatching an event when bufferedAmount drops to 0 Product: WebAppsWG Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: WebSocket API (editor: Ian Hickson) AssignedTo: ian@hixie.ch ReportedBy: Olli.Pettay@gmail.com QAContact: member-webapi-cvs@w3.org CC: mike@w3.org, public-webapps@w3.org Right now the spec has example socket.onopen = function () { setInterval(function() { if (socket.bufferedAmount == 0) socket.send(getUpdateData()); }, 50); }; That works, sure, but in many cases there shouldn't be a need for such interval. Especially in worker context something like: socket.onemptybuffer = function () { socket.send(getUpdateData()); }; could work quite nicely. -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Thursday, 15 December 2011 13:20:49 UTC