[whatwg] Issues with Web Sockets API

Jeff Walden jwalden+whatwg at MIT.EDU
Fri Jun 26 16:34:14 PDT 2009

On 26.6.09 13:52, Michael Nordman wrote:
> There isn't a way to determine if the WebSocket is successfully sending
> the postMessage data? For all the caller knows, its just backing up and
> not going anywhere.

You can't really know data has been successfully sent until you get a response that acknowledges it.  Getting it "on the wire" doesn't mean it'll actually be received; I'm not really sure how much value knowing that's happened actually has, other than for doing network diagnostics (which hardly seems a use case to support).

> postMessage() may want another exception condition... 'too much data
> pending exception'... consider calling postMessage in a while(true)
> loop... at some point the system is going to have to give up queing the
> data if its not actually making its way out on the wire.

Nothing prevents the data from being thrown in a FIFO queue until it actually can be sent, and I don't see a reason why OOM in the event queueing failed should be handled differently from any other OOM.


More information about the whatwg mailing list