Skip to content

Commit

Permalink
[giow] (0) Add commentary on PING and PONG frames.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13104

git-svn-id: http://svn.whatwg.org/webapps@6752 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 25, 2011
1 parent 8f463bf commit f0b851b
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 19 deletions.
31 changes: 23 additions & 8 deletions complete.html
Expand Up @@ -1065,11 +1065,11 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 25 October 2011</
<ol>
<li><a href=#network-intro><span class=secno>11.3.1 </span>Introduction</a></li>
<li><a href=#the-websocket-interface><span class=secno>11.3.2 </span>The <code>WebSocket</code> interface</a></li>
<li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a>
<ol>
<li><a href=#parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</a></li>
<li><a href=#event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</a></li>
<li><a href=#garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</a></ol></ol></li>
<li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a></li>
<li><a href=#ping-and-pong-frames><span class=secno>11.3.4 </span>Ping and Pong frames</a></li>
<li><a href=#parsing-websocket-urls><span class=secno>11.3.5 </span>Parsing WebSocket URLs</a></li>
<li><a href=#event-definitions-3><span class=secno>11.3.6 </span>Event definitions</a></li>
<li><a href=#garbage-collection-2><span class=secno>11.3.7 </span>Garbage collection</a></ol></li>
<li><a href=#web-messaging><span class=secno>11.4 </span>Cross-document messaging</a>
<ol>
<li><a href=#introduction-14><span class=secno>11.4.1 </span>Introduction</a></li>
Expand Down Expand Up @@ -81312,7 +81312,22 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
source</dfn>.</p>


<h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</h5>
<h4 id=ping-and-pong-frames><span class=secno>11.3.4 </span>Ping and Pong frames</h4>

<p>The WebSocket protocol specification defines Ping and Pong frames
that can be used for keep-alive, heart-beats, network status
probing, latency instrumentation, and so forth. These are not
currently exposed in the API.</p>

<p>User agents may send ping and unsolicited pong frames as desired,
for example in an attempt to maintain local network NAT mappings, to
detect failed connections, or to display latency metrics to the
user. User agents must not use pings or unsolicited pongs to aid the
server; it is assumed that servers will send solicit pongs whenever
appropriate for the server's needs.</p>


<h4 id=parsing-websocket-urls><span class=secno>11.3.5 </span>Parsing WebSocket URLs</h4>

<p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from
a string <var title="">url</var> are as follows. These steps return
Expand Down Expand Up @@ -81374,7 +81389,7 @@ <h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocke
<li><p>Return <var title="">host</var>, <var title="">port</var>,
<var title="">resource name</var>, and <var title="">secure</var>.</li>

</ol><h5 id=event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</h5>
</ol><h4 id=event-definitions-3><span class=secno>11.3.6 </span>Event definitions</h4>

<pre class=idl>[Constructor(DOMString type, optional <a href=#closeeventinit>CloseEventInit</a> eventInitDict)]
interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
Expand Down Expand Up @@ -81408,7 +81423,7 @@ <h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocke



<h5 id=garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</h5>
<h4 id=garbage-collection-2><span class=secno>11.3.7 </span>Garbage collection</h4>

<p>A <code><a href=#websocket>WebSocket</a></code> object whose <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
was set to <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code>
Expand Down
31 changes: 23 additions & 8 deletions index
Expand Up @@ -1065,11 +1065,11 @@
<ol>
<li><a href=#network-intro><span class=secno>11.3.1 </span>Introduction</a></li>
<li><a href=#the-websocket-interface><span class=secno>11.3.2 </span>The <code>WebSocket</code> interface</a></li>
<li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a>
<ol>
<li><a href=#parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</a></li>
<li><a href=#event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</a></li>
<li><a href=#garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</a></ol></ol></li>
<li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a></li>
<li><a href=#ping-and-pong-frames><span class=secno>11.3.4 </span>Ping and Pong frames</a></li>
<li><a href=#parsing-websocket-urls><span class=secno>11.3.5 </span>Parsing WebSocket URLs</a></li>
<li><a href=#event-definitions-3><span class=secno>11.3.6 </span>Event definitions</a></li>
<li><a href=#garbage-collection-2><span class=secno>11.3.7 </span>Garbage collection</a></ol></li>
<li><a href=#web-messaging><span class=secno>11.4 </span>Cross-document messaging</a>
<ol>
<li><a href=#introduction-14><span class=secno>11.4.1 </span>Introduction</a></li>
Expand Down Expand Up @@ -81312,7 +81312,22 @@ socket.onopen = function () {
source</dfn>.</p>


<h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</h5>
<h4 id=ping-and-pong-frames><span class=secno>11.3.4 </span>Ping and Pong frames</h4>

<p>The WebSocket protocol specification defines Ping and Pong frames
that can be used for keep-alive, heart-beats, network status
probing, latency instrumentation, and so forth. These are not
currently exposed in the API.</p>

<p>User agents may send ping and unsolicited pong frames as desired,
for example in an attempt to maintain local network NAT mappings, to
detect failed connections, or to display latency metrics to the
user. User agents must not use pings or unsolicited pongs to aid the
server; it is assumed that servers will send solicit pongs whenever
appropriate for the server's needs.</p>


<h4 id=parsing-websocket-urls><span class=secno>11.3.5 </span>Parsing WebSocket URLs</h4>

<p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from
a string <var title="">url</var> are as follows. These steps return
Expand Down Expand Up @@ -81374,7 +81389,7 @@ socket.onopen = function () {
<li><p>Return <var title="">host</var>, <var title="">port</var>,
<var title="">resource name</var>, and <var title="">secure</var>.</li>

</ol><h5 id=event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</h5>
</ol><h4 id=event-definitions-3><span class=secno>11.3.6 </span>Event definitions</h4>

<pre class=idl>[Constructor(DOMString type, optional <a href=#closeeventinit>CloseEventInit</a> eventInitDict)]
interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
Expand Down Expand Up @@ -81408,7 +81423,7 @@ dictionary <dfn id=closeeventinit>CloseEventInit</dfn> : <a href=#eventinit>Even



<h5 id=garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</h5>
<h4 id=garbage-collection-2><span class=secno>11.3.7 </span>Garbage collection</h4>

<p>A <code><a href=#websocket>WebSocket</a></code> object whose <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
was set to <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code>
Expand Down
21 changes: 18 additions & 3 deletions source
Expand Up @@ -92108,7 +92108,22 @@ socket.onopen = function () {
source</dfn>.</p>


<h5>Parsing WebSocket URLs</h5>
<h4>Ping and Pong frames</h4>

<p>The WebSocket protocol specification defines Ping and Pong frames
that can be used for keep-alive, heart-beats, network status
probing, latency instrumentation, and so forth. These are not
currently exposed in the API.</p>

<p>User agents may send ping and unsolicited pong frames as desired,
for example in an attempt to maintain local network NAT mappings, to
detect failed connections, or to display latency metrics to the
user. User agents must not use pings or unsolicited pongs to aid the
server; it is assumed that servers will send solicit pongs whenever
appropriate for the server's needs.</p>


<h4>Parsing WebSocket URLs</h4>

<p>The steps to <dfn>parse a WebSocket URL's components</dfn> from
a string <var title="">url</var> are as follows. These steps return
Expand Down Expand Up @@ -92189,7 +92204,7 @@ socket.onopen = function () {
</ol>


<h5>Event definitions</h5>
<h4>Event definitions</h4>

<pre class="idl">[Constructor(DOMString type, optional <span>CloseEventInit</span> eventInitDict)]
interface <dfn>CloseEvent</dfn> : <span>Event</span> {
Expand Down Expand Up @@ -92224,7 +92239,7 @@ dictionary <dfn>CloseEventInit</dfn> : <span>EventInit</span> {



<h5>Garbage collection</h5>
<h4>Garbage collection</h4>

<p>A <code>WebSocket</code> object whose <code
title="dom-WebSocket-readyState">readyState</code> attribute's value
Expand Down

0 comments on commit f0b851b

Please sign in to comment.