Add WebSocket URL path to UI settings.

This commit is contained in:
Joel Martin
2011-09-27 12:36:06 -05:00
parent 7cd6118ce5
commit 6209639f2c
4 changed files with 15 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ var that = {}, // Public API methods
rfb_host = '',
rfb_port = 5900,
rfb_password = '',
rfb_uri = '',
rfb_path = '',
rfb_state = 'disconnected',
rfb_version = 0,
@@ -273,7 +273,7 @@ function connect() {
} else {
uri = "ws://";
}
uri += rfb_host + ":" + rfb_port + "/" + rfb_uri;
uri += rfb_host + ":" + rfb_port + "/" + rfb_path;
Util.Info("connecting to " + uri);
ws.open(uri);
@@ -1526,13 +1526,13 @@ clientCutText = function(text) {
// Public API interface functions
//
that.connect = function(host, port, password, uri) {
that.connect = function(host, port, password, path) {
//Util.Debug(">> connect");
rfb_host = host;
rfb_port = port;
rfb_password = (password !== undefined) ? password : "";
rfb_uri = (uri !== undefined) ? uri : "";
rfb_path = (path !== undefined) ? path : "";
if ((!rfb_host) || (!rfb_port)) {
return fail("Must set host and port");