Using WebSocket tunnnel for connection (HTTP Tunnel temporarily disabled - need suppo...
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Thu, 8 Mar 2012 16:14:18 +0000 (08:14 -0800)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Thu, 8 Mar 2012 16:14:18 +0000 (08:14 -0800)
src/main/webapp/client.xhtml

index fb8c20c..1a319ea 100644 (file)
             window.onload = function() {
                 window.setTimeout(function() {
 
+                    var tunnel;
+
+                    // TODO: Detect WebSocket and websocket-tunnel
+                    tunnel = new Guacamole.WebSocketTunnel("websocket-tunnel")
+                    //tunnel = new Guacamole.HTTPTunnel("tunnel")
+
                     // Instantiate client
-                    var guac = new Guacamole.Client(
-                        new Guacamole.HTTPTunnel("tunnel")
-                    );
+                    var guac = new Guacamole.Client(tunnel);
 
                     // Add client to UI
                     guac.getDisplay().className = "software-cursor";