[websockets] Constructor vs. open()

As I proposed in March [1], we think it makes sense to separate the WebSocket constructor from the operation to initiate the network operation. We proposed a separate open() method similar to XHR. This allows a WebSocket object to be constructed and initialised prior to communication. We think this makes the design more future-proof because otherwise and new information required prior to establishing the connection will need to be added to the constructor arguments.

I'm interested to know how other implementers feel about this proposal.

Thanks,

Adrian.

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=12102#c9

Received on Saturday, 28 May 2011 00:49:18 UTC