Răsfoiți Sursa

Merge branch 'master' of git@github.com:kanaka/noVNC

Joel Martin 14 ani în urmă
părinte
comite
96513f5645
1 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 4 2
      include/rfb.js

+ 4 - 2
include/rfb.js

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