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

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-0001.htm>

Received on Tuesday, 27 October 2009 10:41:29 UTC