Re: Proposal for API for Data

On Apr 12, 2012, at 12:06 PM, Timothy B. Terriberry wrote:

> Michael Tuexen wrote:
>> Not the way send() is handled at the socket layer, but if it is common at the JS API...
> 
> I don't know about "common"... I'm just describing how the WebSockets API is currently defined, since we're talking about adopting and/or extending it. As I said, I would not have found this behavior obvious.
After reading the WebSockets spec, I understand that send() doesn't return anything but can throw
an error. For example calling send() in the state CONNECTING throws an InvalidStateError.
Why not in all states except OPEN? That would be what I expect...

Best regards
Michael
> 
> 

Received on Thursday, 12 April 2012 10:59:55 UTC