[whatwg] Web Sockets API — send() with closed connections

Avi Flax avif at arc90.com
Tue Oct 27 10:41:29 PDT 2009

On Tue, Oct 27, 2009 at 01:17, Ian Hickson <ian at hixie.ch> wrote:

> The connection might get closed at any point, e.g. between the script
> checking if the connection might be closed and the script calling the
> send() method. Because of this, if we raised an exception when the
> connection was closed, we'd run the risk of the script randomly throwing
> an exception in a way that the author likely did not check for.
> This isn't a problem for the CONNECTING case, since there is an event that
> fires before the script can use the send() method, and thus the author is
> unlikely to accidentally run into that exception in a way that wouldn't
> be quickly caught in testing.

Makes sense. Thanks!

Avi Flax » Partner » Arc90 » http://arc90.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091027/48019ac8/attachment-0002.htm>

More information about the whatwg mailing list