<?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>15210</bug_id>
          
          <creation_ts>2011-12-15 13:20:42 +0000</creation_ts>
          <short_desc>Consider dispatching an event when bufferedAmount drops to 0</short_desc>
          <delta_ts>2012-12-31 04:59:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebSocket API (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>REMIND</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>v2; might mark this LATER after checking on implementation status — this should be amongst the next batch of additions to the API ,though</status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>15209</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Olli Pettay">bugs</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>art.barstow</cc>
    
    <cc>brian.raymor</cc>
    
    <cc>ian</cc>
    
    <cc>jduell.mcbugs</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61599</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-12-15 13:20:42 +0000</bug_when>
    <thetext>Right now the spec has example
socket.onopen = function () {
    setInterval(function() {
      if (socket.bufferedAmount == 0)
        socket.send(getUpdateData());
    }, 50);
  };

That works, sure, but in many cases there shouldn&apos;t be a need for such interval.
Especially in worker context something like:
socket.onemptybuffer = function () {
    socket.send(getUpdateData());
  };
could work quite nicely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63256</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-01-28 22:13:34 +0000</bug_when>
    <thetext>Yeah, that&apos;s probably reasonable. I expect we&apos;ll add this in due course. Probably best to let the implementations catch up with the protocol changes and deploy more widely before adding more stuff, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71360</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-07-24 06:00:27 +0000</bug_when>
    <thetext>This should probably be done at the same time as bug 15209.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80753</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-31 04:59:29 +0000</bug_when>
    <thetext>Marking this and bug 15209 as REMIND for now. Will reopen in a few months and see whether we&apos;ve found that it&apos;s a real problem or not.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>