<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>22428</bug_id>
          
          <creation_ts>2013-06-23 18:02:02 +0000</creation_ts>
          <short_desc>Please unify the WebSocket and RTCDataChannel &quot;readyState&quot;. enum RTCDataChannelState {     &quot;connecting&quot;,     &quot;open&quot;,     &quot;closing&quot;,     &quot;closed&quot; }; VS const unsigned short CONNECTING = 0 [...]</short_desc>
          <delta_ts>2013-12-06 14:06:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>WebRTC API</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Web RTC Working Group">public-webrtc</assigned_to>
          <cc>adam.bergkvist</cc>
    
    <cc>harald</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-webrtc</cc>
    
    <cc>w3c-bugzilla</cc>
    
    <cc>zcorpan</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89732</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-23 18:02:02 +0000</bug_when>
    <thetext>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 &quot;readyState&quot;.

enum RTCDataChannelState {
    &quot;connecting&quot;,
    &quot;open&quot;,
    &quot;closing&quot;,
    &quot;closed&quot;
};

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 &quot;close&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89734</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-23 18:20:27 +0000</bug_when>
    <thetext>WebSocket has shipped in multiple browsers and I believe it is pretty widely used at this point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90170</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-02 22:57:21 +0000</bug_when>
    <thetext>Yeah, if you want this unified, it has to be done on the RTC side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90212</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2013-07-03 05:44:38 +0000</bug_when>
    <thetext>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&apos;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&apos;re modeling it after an existing API and want to make it easy to switch between the two for different transport needs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97244</commentid>
    <comment_count>4</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2013-12-06 14:06:34 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>