[html5] r3429 - [e] (0) Add a section on establishing a connection.

whatwg at whatwg.org whatwg at whatwg.org
Thu Jul 16 16:52:44 PDT 2009


Author: ianh
Date: 2009-07-16 16:52:43 -0700 (Thu, 16 Jul 2009)
New Revision: 3429

Modified:
   source
Log:
[e] (0) Add a section on establishing a connection.

Modified: source
===================================================================
--- source	2009-07-16 21:40:45 UTC (rev 3428)
+++ source	2009-07-16 23:52:43 UTC (rev 3429)
@@ -69629,15 +69629,45 @@
 
   <h6>Relationship to TCP/IP and HTTP</h6>
 
-  <p>WebSocket is an independent TCP-based protocol. It's only
-  relationship to HTTP is that its handshake is interpreted by HTTP
-  servers as an Upgrade request.</p>
+  <p>The Web Socket protocol is an independent TCP-based
+  protocol. It's only relationship to HTTP is that its handshake is
+  interpreted by HTTP servers as an Upgrade request.</p>
 
-  <p>The WebSocket protocol by default uses port 81 for regular
-  WebSocket connections and port 815 for WebSocket connections
+  <p>The Web Socket protocol by default uses port 81 for regular
+  Web Socket connections and port 815 for Web Socket connections
   tunneled over TLS.</p>
 
 
+  <h6>Establishing a connection</h6>
+
+  <p>There are several options for establishing a Web Socket connection.</p>
+
+  <p>The simplest method is to use port 81 to get a direct connection
+  to a Web Socket server. However, this port may be blocked by
+  firewalls.</p>
+
+  <p>The second simplest method is to use TLS encryption and port 815
+  to connect directly to a Web Socket server. This is the preferred
+  solution, as it is secure and correct. However, TLS encryption can
+  be computationally expensive, and port 815 might also be blocked by
+  firewalls.</p>
+
+  <p>To avoid firewalls, ports 80 and 443 might be used instead. These
+  are the HTTP and HTTPS ports. Port 80 traffic, however, will often
+  be intercepted by HTTP proxies, which can lead to the connection
+  failing to be established.</p>
+
+  <p>Port 443, using encryption, is therefore the most reliable
+  solution. It is unlikely to be blocked by a firewall or intercepted
+  by a proxy. However, again, TLS encryption can be computationally
+  expensive.</p>
+
+  <p>When a connection is to be made to a port that is shared by an
+  HTTP server (a situation that is quite likely to occur with traffic
+  to ports 80 and 443), the connection will appear to the HTTP server
+  to be a regular GET request with an Upgrade offer.</p>
+
+
   <!--BOILERPLATE middle-ietf-conformance-->
 
 
@@ -69700,7 +69730,7 @@
    <li>
 
     <p>If the user agent is configured to use a proxy when using the
-    WebSocket protocol to connect to host <var title="">host</var>
+    Web Socket protocol to connect to host <var title="">host</var>
     and/or port <var title="">port</var>, then connect to that proxy
     and ask it to open a TCP/IP connection to the host given by <var
     title="">host</var> and the port given by <var
@@ -69730,8 +69760,8 @@
     title="">port</var>.</p>
 
     <p class="note">Implementations that do not expose explicit UI for
-    selecting a proxy for WebSocket connections separate from other
-    proxies are encouraged to use a SOCKS proxy for WebSocket
+    selecting a proxy for Web Socket connections separate from other
+    proxies are encouraged to use a SOCKS proxy for Web Socket
     connections, if available, or failing that, to prefer an HTTPS
     proxy over an HTTP proxy.</p>
 




More information about the Commit-Watchers mailing list