W3C home > Mailing lists > Public > public-html-commits@w3.org > April 2009

html5/websockets Overview.html,1.69,1.70

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 24 Apr 2009 07:33:14 +0000
To: public-html-commits@w3.org
Message-Id: <E1LxFuM-0001OV-HS@lionel-hutz.w3.org>
Update of /sources/public/html5/websockets
In directory hutz:/tmp/cvs-serv5345

Modified Files:
	Overview.html 
Log Message:
Add a protocol flag to WebSocket(), which, if set, must be echoed by the server. (whatwg r2977)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/websockets/Overview.html,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- Overview.html	24 Apr 2009 06:48:32 -0000	1.69
+++ Overview.html	24 Apr 2009 07:33:12 -0000	1.70
@@ -295,7 +295,7 @@
   <code>Node</code> objects as defined in the DOM Core
   specifications. <a href="#references">[DOM3CORE]</a><p>A DOM attribute is said to be <em>getting</em> when its value is
   being retrieved (e.g. by author script), and is said to be
-  <em>setting</em> when a new value is assigned to it.<h2 id="the-websocket-interface"><span class="secno">4 </span>The <code><a href="#websocket">WebSocket</a></code> interface</h2><pre class="idl">[<a href="#dom-websocket" title="dom-WebSocket">Constructor</a>(in DOMString url)]
+  <em>setting</em> when a new value is assigned to it.<h2 id="the-websocket-interface"><span class="secno">4 </span>The <code><a href="#websocket">WebSocket</a></code> interface</h2><pre class="idl">[<a href="#dom-websocket" title="dom-WebSocket">Constructor</a>(in DOMString url, [Optional] in DOMString protocol)]
 interface <dfn id="websocket">WebSocket</dfn> {
   readonly attribute DOMString <a href="#dom-websocket-url" title="dom-WebSocket-URL">URL</a>;
 
@@ -314,10 +314,12 @@
 };</pre><p><code><a href="#websocket">WebSocket</a></code> objects must also implement the
   <code>EventTarget</code> interface. <a href="#references">[DOM3EVENTS]</a>
 
-  <p>The <dfn id="dom-websocket" title="dom-WebSocket"><code>WebSocket(<var title="">url</var>)</code></dfn> constructor takes one argument,
-  <var title="">url</var>, which specifies the <span>URL</span> to
-  which to connect. When the <code>WebSocket()</code> constructor is
-  invoked, the UA must run these steps:<ol><li><p><span title="parse a url">Parse</span> the <var title="">url</var> argument.</li>
+  <p>The <dfn id="dom-websocket" title="dom-WebSocket"><code>WebSocket(<var title="">url</var>, <var title="">protocol</var>)</code></dfn>
+  constructor takes one or two arguments. The first argument, <var title="">url</var>, specifies the <span>URL</span> to which to
+  connect. The second, <var title="">protocol</var>, if present,
+  specifies a sub-protocol that the server must support for the
+  connection to be successful. When the <code>WebSocket()</code>
+  constructor is invoked, the UA must run these steps:<ol><li><p><span title="parse a url">Parse</span> the <var title="">url</var> argument.</li>
 
    <li><p>If the previous step failed, or if <var title="">url</var>
    does not have a <span title="url-scheme">&lt;scheme&gt;</span>
@@ -326,6 +328,11 @@
    case-insensitive</span> manner, then throw a
    <code>SYNTAX_ERR</code> exception.</li>
 
+   <li><p>If <var title="">protocol</var> is specified but is either
+   the empty string or contains characters that are not in the range
+   U+0021 .. U+007E, then throw a <code>SYNTAX_ERR</code>
+   exception.</li>
+
    <li><p>Return a new <code><a href="#websocket">WebSocket</a></code> object, and continue
    these steps in the background (without blocking scripts).</li>
 
@@ -357,8 +364,9 @@
 
    <li><p><span>Establish a Web Socket connection</span> to a host
    <var title="">host</var>, on port <var title="">port</var> (if one
-   was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, and with <var title="">resource name</var>
-   as the resource name.</li>
+   was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, with <var title="">resource name</var> as
+   the resource name, and with <var title="">protocol</var> as the
+   protocol (if it is present).</li>
 
   </ol><hr><p>The <dfn id="dom-websocket-url" title="dom-WebSocket-URL"><code>URL</code></dfn>
   attribute must return the value that was passed to the
Received on Friday, 24 April 2009 07:33:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 24 April 2009 07:33:24 GMT