W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[websockets] Constructor vs. open()

From: Adrian Bateman <adrianba@microsoft.com>
Date: Sat, 28 May 2011 00:47:48 +0000
To: "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
Message-ID: <104E6B5B6535E849970CDFBB1C5216EB432ED5E9@TK5EX14MBXC136.redmond.corp.microsoft.com>
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.



[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=12102#c9
Received on Saturday, 28 May 2011 00:49:18 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:32 UTC