mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
More JSDoc and cleanup.
This commit is contained in:
@@ -19,6 +19,35 @@
|
||||
// Guacamole namespace
|
||||
var Guacamole = Guacamole || {};
|
||||
|
||||
/**
|
||||
* Core object providing abstract communication for Guacamole. This object
|
||||
* is a null implementation whose functions do nothing. Guacamole applications
|
||||
* should use {@link Guacamole.HTTPTunnel} instead, or implement their own tunnel based
|
||||
* on this one.
|
||||
*
|
||||
* @constructor
|
||||
* @see Guacamole.HTTPTunnel
|
||||
*/
|
||||
Guacamole.Tunnel = function() {
|
||||
|
||||
this.connect = function(data) {};
|
||||
|
||||
this.disconnect = function() {};
|
||||
|
||||
this.sendMessage = function(message) {};
|
||||
|
||||
this.onerror = null;
|
||||
this.oninstruction = null;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Guacamole Tunnel implemented over HTTP via XMLHttpRequest.
|
||||
*
|
||||
* @constructor
|
||||
* @augments Guacamole.Tunnel
|
||||
* @param {String} tunnelURL The URL of the HTTP tunneling service.
|
||||
*/
|
||||
Guacamole.HTTPTunnel = function(tunnelURL) {
|
||||
|
||||
var tunnel = this;
|
||||
@@ -44,10 +73,6 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
||||
var sendingMessages = 0;
|
||||
var outputMessageBuffer = "";
|
||||
|
||||
// Handlers
|
||||
tunnel.onerror = null;
|
||||
tunnel.oninstruction = null;
|
||||
|
||||
function sendMessage(message) {
|
||||
|
||||
// Do not attempt to send messages if not connected
|
||||
@@ -267,4 +292,6 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
||||
tunnel.disconnect = disconnect;
|
||||
tunnel.sendMessage = sendMessage;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Guacamole.HTTPTunnel.prototype = new Guacamole.Tunnel();
|
||||
|
Reference in New Issue
Block a user