[html5] r4401 - [e] (0) Add an intro section talking about the WebSocket-Protocol values.

whatwg at whatwg.org whatwg at whatwg.org
Thu Dec 3 17:03:34 PST 2009


Author: ianh
Date: 2009-12-03 17:03:31 -0800 (Thu, 03 Dec 2009)
New Revision: 4401

Modified:
   complete.html
   source
Log:
[e] (0) Add an intro section talking about the WebSocket-Protocol values.

Modified: complete.html
===================================================================
--- complete.html	2009-12-04 00:28:38 UTC (rev 4400)
+++ complete.html	2009-12-04 01:03:31 UTC (rev 4401)
@@ -935,7 +935,8 @@
          <li><a href=#security-model><span class=secno>10.3.4.1.4 </span>Security model</a></li>
          <li><a href=#relationship-to-tcp/ip-and-http><span class=secno>10.3.4.1.5 </span>Relationship to TCP/IP and HTTP</a></li>
          <li><a href=#establishing-a-connection><span class=secno>10.3.4.1.6 </span>Establishing a connection</a></li>
-         <li><a href=#writing-a-simple-web-socket-server><span class=secno>10.3.4.1.7 </span>Writing a simple Web Socket server</a></ol></li>
+         <li><a href=#writing-a-simple-web-socket-server><span class=secno>10.3.4.1.7 </span>Writing a simple Web Socket server</a></li>
+         <li><a href=#subprotocols-using-the-web-socket-protocol><span class=secno>10.3.4.1.8 </span>Subprotocols using the Web Socket protocol</a></ol></li>
        <li><a href=#web-socket-urls><span class=secno>10.3.4.2 </span>Web Socket URLs</a>
         <ol>
          <li><a href=#parsing-web-socket-urls><span class=secno>10.3.4.2.1 </span>Parsing Web Socket URLs</a></li>
@@ -65771,9 +65772,40 @@
   <p>The connection can be closed as desired.</p>
 
 
+  <h6 id=subprotocols-using-the-web-socket-protocol><span class=secno>10.3.4.1.8 </span>Subprotocols using the Web Socket protocol</h6>
 
+  <p><i>This section is non-normative.</i></p>
 
+  <p>The client can request that the server use a specific subprotocol
+  by including the <code title=http-websocket-protocol><a href=#websocket-protocol-0>Websocket-Protocol</a></code> header in
+  its handshake. If it is specified, the server needs to include the
+  same header and value in its response for the connection to be
+  established.</p>
 
+  <p>These subprotocol names do not need to be registered, but if a
+  subprotocol is intended to be implemented by multiple independent
+  Web Socket servers, potential clashes with the names of subprotocols
+  defined independently can be avoided by using names that contain the
+  domain name of the subprotocol's originator. For example, if Example
+  Corporation were to create a Chat subprotocol to be implemented by
+  many servers around the Web, they could name it
+  "chat.example.com". If the Example Organisation called their
+  competing subprotocol "example.org's chat protocol", then
+  the two subprotocols could be implemented by servers simultaneously,
+  with the server dynamically selecting which subprotocol to use based
+  on the value sent by the client.</p>
+
+  <p>Subprotocols can be versioned in backwards-incompatible ways by
+  changing the subprotocol name, eg. going from "bookings.example.net"
+  to "bookings.example.net2". These subprotocols would be considered
+  completely separate by Web Socket clients. Backwards-compatible
+  versioning can be implemented by reusing the same subprotocol string
+  but carefully designing the actual subprotocol to support this kind
+  of extensibility.</p>
+
+
+
+
   <h5 id=web-socket-urls><span class=secno>10.3.4.2 </span>Web Socket URLs</h5>
 
   <h6 id=parsing-web-socket-urls><span class=secno>10.3.4.2.1 </span>Parsing Web Socket URLs</h6>

Modified: source
===================================================================
--- source	2009-12-04 00:28:38 UTC (rev 4400)
+++ source	2009-12-04 01:03:31 UTC (rev 4401)
@@ -75002,7 +75002,39 @@
   <p>The connection can be closed as desired.</p>
 
 
+  <h6>Subprotocols using the Web Socket protocol</h6>
 
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The client can request that the server use a specific subprotocol
+  by including the <code
+  title="http-websocket-protocol">Websocket-Protocol</code> header in
+  its handshake. If it is specified, the server needs to include the
+  same header and value in its response for the connection to be
+  established.</p>
+
+  <p>These subprotocol names do not need to be registered, but if a
+  subprotocol is intended to be implemented by multiple independent
+  Web Socket servers, potential clashes with the names of subprotocols
+  defined independently can be avoided by using names that contain the
+  domain name of the subprotocol's originator. For example, if Example
+  Corporation were to create a Chat subprotocol to be implemented by
+  many servers around the Web, they could name it
+  "chat.example.com". If the Example Organisation called their
+  competing subprotocol "example.org's chat protocol", then
+  the two subprotocols could be implemented by servers simultaneously,
+  with the server dynamically selecting which subprotocol to use based
+  on the value sent by the client.</p>
+
+  <p>Subprotocols can be versioned in backwards-incompatible ways by
+  changing the subprotocol name, eg. going from "bookings.example.net"
+  to "bookings.example.net2". These subprotocols would be considered
+  completely separate by Web Socket clients. Backwards-compatible
+  versioning can be implemented by reusing the same subprotocol string
+  but carefully designing the actual subprotocol to support this kind
+  of extensibility.</p>
+
+
 <!--END complete-->
 
   <!--BOILERPLATE middle-ietf-conformance-->




More information about the Commit-Watchers mailing list