add some documentation; default to existing websocket transport

This commit is contained in:
Mike Tinglof 2012-03-09 11:02:18 -05:00
parent 9b75bcaada
commit d38db74abd
4 changed files with 19 additions and 7 deletions

View File

@ -26,7 +26,7 @@ their products including: [Ganeti Web Manager](http://code.osuosl.org/projects/g
* Easy site integration and theming (3 example themes included) * Easy site integration and theming (3 example themes included)
* Licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl.html) * Licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl.html)
* Support for tight encoding (contributed by Mercuri.ca)
### Screenshots ### Screenshots

View File

@ -195,6 +195,9 @@ function JSUnzip() {
/* /*
* tinflate javascript port by Erik Moller in May 2011. * tinflate javascript port by Erik Moller in May 2011.
* emoller@opera.com * emoller@opera.com
*
* read_bits() patched by mike@imidio.com to allow
* reading more then 8 bits (needed in some zlib streams)
*/ */
"use strict"; "use strict";

View File

@ -4,6 +4,9 @@
* Licensed under LGPL-3 (see LICENSE.txt) * Licensed under LGPL-3 (see LICENSE.txt)
* *
* See README.md for usage and integration instructions. * See README.md for usage and integration instructions.
*
* TIGHT decoder portion:
* (c) 2012 Michael Tinglof, Joe Balaz, Les Piech (Mercuri.ca)
*/ */
/*jslint white: false, browser: true, bitwise: false, plusplus: false */ /*jslint white: false, browser: true, bitwise: false, plusplus: false */
@ -275,14 +278,18 @@ function constructor() {
function connect() { function connect() {
Util.Debug(">> RFB.connect"); Util.Debug(">> RFB.connect");
var uri;
var uri = "";
if (conf.encrypt) { if (typeof UsingSocketIO !== "undefined") {
uri = "wss://"; uri = "http://" + rfb_host + ":" + rfb_port + "/" + rfb_path;
} else { } else {
uri = "ws://"; if (conf.encrypt) {
uri = "wss://";
} else {
uri = "ws://";
}
uri += rfb_host + ":" + rfb_port + "/" + rfb_path;
} }
uri += rfb_host + ":" + rfb_port + "/" + rfb_path;
Util.Info("connecting to " + uri); Util.Info("connecting to " + uri);
ws.open(uri); ws.open(uri);

View File

@ -32,9 +32,11 @@ function get_INCLUDE_URI() {
extra += start + "webutil.js" + end; extra += start + "webutil.js" + end;
extra += start + "base64.js" + end; extra += start + "base64.js" + end;
extra += start + "websock.js" + end; extra += start + "websock.js" + end;
// extra += start + "socketio.js" + end;
extra += start + "des.js" + end; extra += start + "des.js" + end;
extra += start + "input.js" + end; extra += start + "input.js" + end;
extra += start + "display.js" + end; extra += start + "display.js" + end;
extra += start + "blowfish.js" + end;
extra += start + "rfb.js" + end; extra += start + "rfb.js" + end;
extra += start + "jsunzip.js" + end; extra += start + "jsunzip.js" + end;