This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://dev.w3.org/html5/websockets/ Multipage: http://www.whatwg.org/C#top Complete: http://www.whatwg.org/c#top Referrer: Comment: Please unify the WebSocket and RTCDataChannel "readyState". enum RTCDataChannelState { "connecting", "open", "closing", "closed" }; VS const unsigned short CONNECTING = 0; const unsigned short OPEN = 1; const unsigned short CLOSING = 2; const unsigned short CLOSED = 3; I personally prefer the enum. The "close" method also slightly differs and could be synced. Posted from: 85.178.10.173 User agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20130618 Firefox/24.0
WebSocket has shipped in multiple browsers and I believe it is pretty widely used at this point.
Yeah, if you want this unified, it has to be done on the RTC side.
This thread contains the discussion that lead to us using strings instead of numeric constants: http://lists.w3.org/Archives/Public/public-webrtc/2012Feb/0119.html It's a bit of a tricky situation. DataChannel is a new API and should therefore use the latest conventions, but at the same time we're modeling it after an existing API and want to make it easy to switch between the two for different transport needs.
Closing this as WONTFIX - the group has gone over this ground, and I think the decision to be internally consistent in the spec on using string enums was pretty solid at the time.