[html5] r8516 - [e] (0) Clarify that close() doesn't drop earlier sent() images. Fixing https:// [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Feb 27 16:39:48 PST 2014


Author: ianh
Date: 2014-02-27 16:39:47 -0800 (Thu, 27 Feb 2014)
New Revision: 8516

Modified:
   complete.html
   index
   source
Log:
[e] (0) Clarify that close() doesn't drop earlier sent() images.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24824
Affected topics: HTML, WebSocket API

Modified: complete.html
===================================================================
--- complete.html	2014-02-27 22:16:33 UTC (rev 8515)
+++ complete.html	2014-02-28 00:39:47 UTC (rev 8516)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 February 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 February 2014</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -4016,6 +4016,7 @@
      <li><dfn id=headers-to-send-appropriate-cookies>headers to send appropriate cookies</dfn>
      <li><dfn id="cookies-set-during-the-server's-opening-handshake">cookies set during the server's opening handshake</dfn>
      <li><dfn id=a-websocket-message-has-been-received>a WebSocket message has been received</dfn>
+     <li><dfn id=send-a-websocket-message>send a WebSocket Message</dfn>
      <li><dfn id=fail-the-websocket-connection>fail the WebSocket connection</dfn>
      <li><dfn id=close-the-websocket-connection>close the WebSocket connection</dfn>
      <li><dfn id=start-the-websocket-closing-handshake>start the WebSocket closing handshake</dfn>
@@ -81392,7 +81393,13 @@
 
     </dl></li>
 
-  </ol><hr><!--CLEANUP--><p>The <dfn id=dom-websocket-bufferedamount title=dom-WebSocket-bufferedAmount><code>bufferedAmount</code></dfn> attribute must
+  </ol><p class=note>The <code title=dom-WebSocket-close><a href=#dom-websocket-close>close()</a></code> method does not discard
+  previously sent messages before starting the WebSocket closing handshake — even if, in
+  practice, the user agent is still busy sending those messages, the handshake will only start after
+  the messages are sent.</p> <!-- this is trivially true in this spec, because we don't buffer at
+  all. We just tell the WebSocket API spec to do it. -->
+
+  <hr><!--CLEANUP--><p>The <dfn id=dom-websocket-bufferedamount title=dom-WebSocket-bufferedAmount><code>bufferedAmount</code></dfn> attribute must
   return the number of bytes of application data (UTF-8 text and binary data) that have been queued
   using <code title=dom-WebSocket-send><a href=#dom-websocket-send>send()</a></code> but that, as of the last time the <a href=#event-loop>event
   loop</a> reached step 1, had not yet been
@@ -81452,7 +81459,7 @@
     <p>Let <var title="">data</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString to a
     sequence of Unicode characters">converting the <var title="">data</var> argument to a sequence
     of Unicode characters</a>. If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i> and <i title="the WebSocket closing handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet
-    started</a></i>, then the user agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a text frame opcode; if the data cannot be sent, e.g. because it
+    started</a></i>, then the user agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a text frame opcode; if the data cannot be sent, e.g. because it
     would need to be buffered but the buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the
     WebSocket connection</a></i>. Any invocation of this method with a string argument that does not
     throw an exception must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code> attribute by the number of bytes
@@ -81467,7 +81474,7 @@
 
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is
@@ -81487,7 +81494,7 @@
 <!--CLEANUP-->
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is
@@ -81505,7 +81512,7 @@
 <!--CLEANUP-->
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is

Modified: index
===================================================================
--- index	2014-02-27 22:16:33 UTC (rev 8515)
+++ index	2014-02-28 00:39:47 UTC (rev 8516)
@@ -298,7 +298,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 February 2014</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 February 2014</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -4016,6 +4016,7 @@
      <li><dfn id=headers-to-send-appropriate-cookies>headers to send appropriate cookies</dfn>
      <li><dfn id="cookies-set-during-the-server's-opening-handshake">cookies set during the server's opening handshake</dfn>
      <li><dfn id=a-websocket-message-has-been-received>a WebSocket message has been received</dfn>
+     <li><dfn id=send-a-websocket-message>send a WebSocket Message</dfn>
      <li><dfn id=fail-the-websocket-connection>fail the WebSocket connection</dfn>
      <li><dfn id=close-the-websocket-connection>close the WebSocket connection</dfn>
      <li><dfn id=start-the-websocket-closing-handshake>start the WebSocket closing handshake</dfn>
@@ -81392,7 +81393,13 @@
 
     </dl></li>
 
-  </ol><hr><!--CLEANUP--><p>The <dfn id=dom-websocket-bufferedamount title=dom-WebSocket-bufferedAmount><code>bufferedAmount</code></dfn> attribute must
+  </ol><p class=note>The <code title=dom-WebSocket-close><a href=#dom-websocket-close>close()</a></code> method does not discard
+  previously sent messages before starting the WebSocket closing handshake — even if, in
+  practice, the user agent is still busy sending those messages, the handshake will only start after
+  the messages are sent.</p> <!-- this is trivially true in this spec, because we don't buffer at
+  all. We just tell the WebSocket API spec to do it. -->
+
+  <hr><!--CLEANUP--><p>The <dfn id=dom-websocket-bufferedamount title=dom-WebSocket-bufferedAmount><code>bufferedAmount</code></dfn> attribute must
   return the number of bytes of application data (UTF-8 text and binary data) that have been queued
   using <code title=dom-WebSocket-send><a href=#dom-websocket-send>send()</a></code> but that, as of the last time the <a href=#event-loop>event
   loop</a> reached step 1, had not yet been
@@ -81452,7 +81459,7 @@
     <p>Let <var title="">data</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString to a
     sequence of Unicode characters">converting the <var title="">data</var> argument to a sequence
     of Unicode characters</a>. If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i> and <i title="the WebSocket closing handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet
-    started</a></i>, then the user agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a text frame opcode; if the data cannot be sent, e.g. because it
+    started</a></i>, then the user agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a text frame opcode; if the data cannot be sent, e.g. because it
     would need to be buffered but the buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the
     WebSocket connection</a></i>. Any invocation of this method with a string argument that does not
     throw an exception must increase the <code title=dom-WebSocket-bufferedAmount><a href=#dom-websocket-bufferedamount>bufferedAmount</a></code> attribute by the number of bytes
@@ -81467,7 +81474,7 @@
 
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is
@@ -81487,7 +81494,7 @@
 <!--CLEANUP-->
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is
@@ -81505,7 +81512,7 @@
 <!--CLEANUP-->
     <p>If <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, and <i title="the WebSocket closing
     handshake is started"><a href=#the-websocket-closing-handshake-is-started>the WebSocket closing handshake has not yet started</a></i>, then the user
-    agent must <i>send a WebSocket Message</i> comprised of <var title="">data</var> using a binary
+    agent must <i><a href=#send-a-websocket-message>send a WebSocket Message</a></i> comprised of <var title="">data</var> using a binary
     frame opcode; if the data cannot be sent, e.g. because it would need to be buffered but the
     buffer is full, the user agent must <a href=#concept-websocket-close-fail title=concept-websocket-close-fail>flag the
     WebSocket as full</a> and then <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i>. The data to be sent is

Modified: source
===================================================================
--- source	2014-02-27 22:16:33 UTC (rev 8515)
+++ source	2014-02-28 00:39:47 UTC (rev 8516)
@@ -2786,6 +2786,7 @@
      <li><dfn>headers to send appropriate cookies</dfn>
      <li><dfn>cookies set during the server's opening handshake</dfn>
      <li><dfn>a WebSocket message has been received</dfn>
+     <li><dfn>send a WebSocket Message</dfn>
      <li><dfn>fail the WebSocket connection</dfn>
      <li><dfn>close the WebSocket connection</dfn>
      <li><dfn>start the WebSocket closing handshake</dfn>
@@ -91283,6 +91284,12 @@
 
   </ol>
 
+  <p class="note">The <code data-x="dom-WebSocket-close">close()</code> method does not discard
+  previously sent messages before starting the WebSocket closing handshake — even if, in
+  practice, the user agent is still busy sending those messages, the handshake will only start after
+  the messages are sent.</p> <!-- this is trivially true in this spec, because we don't buffer at
+  all. We just tell the WebSocket API spec to do it. -->
+
   <hr>
 
 <!--CLEANUP-->




More information about the Commit-Watchers mailing list