mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-549: Use Guacamole.Status for ack messages.
This commit is contained in:
@@ -39,9 +39,9 @@ Guacamole.ArrayBufferWriter = function(stream) {
|
|||||||
var guac_writer = this;
|
var guac_writer = this;
|
||||||
|
|
||||||
// Simply call onack for acknowledgements
|
// Simply call onack for acknowledgements
|
||||||
stream.onack = function(message, code) {
|
stream.onack = function(status) {
|
||||||
if (guac_writer.onack)
|
if (guac_writer.onack)
|
||||||
guac_writer.onack(message, code);
|
guac_writer.onack(status);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,9 +74,7 @@ Guacamole.ArrayBufferWriter = function(stream) {
|
|||||||
/**
|
/**
|
||||||
* Fired for received data, if acknowledged by the server.
|
* Fired for received data, if acknowledged by the server.
|
||||||
* @event
|
* @event
|
||||||
* @param {String} message A human-readable status message related to the
|
* @param {Guacamole.Status} status The status of the operation.
|
||||||
* operation performed.
|
|
||||||
* @param {Number} code The error code associated with the operation.
|
|
||||||
*/
|
*/
|
||||||
this.onack = null;
|
this.onack = null;
|
||||||
|
|
||||||
|
@@ -564,7 +564,7 @@ Guacamole.Client = function(tunnel) {
|
|||||||
|
|
||||||
// Signal ack if handler defined
|
// Signal ack if handler defined
|
||||||
if (stream.onack)
|
if (stream.onack)
|
||||||
stream.onack(reason, code);
|
stream.onack(new Guacamole.Status(code, reason));
|
||||||
|
|
||||||
// If code is an error, invalidate stream
|
// If code is an error, invalidate stream
|
||||||
if (code >= 0x0100) {
|
if (code >= 0x0100) {
|
||||||
|
@@ -48,9 +48,7 @@ Guacamole.OutputStream = function(client, index) {
|
|||||||
* that a stream operation has completed, or an error has occurred.
|
* that a stream operation has completed, or an error has occurred.
|
||||||
*
|
*
|
||||||
* @event
|
* @event
|
||||||
* @param {String} message A human-readable status message related to the
|
* @param {Guacamole.Status} status The status of the operation.
|
||||||
* operation performed.
|
|
||||||
* @param {Number} code The error code associated with the operation.
|
|
||||||
*/
|
*/
|
||||||
this.onack = null;
|
this.onack = null;
|
||||||
|
|
||||||
|
@@ -39,9 +39,9 @@ Guacamole.StringWriter = function(stream) {
|
|||||||
var guac_writer = this;
|
var guac_writer = this;
|
||||||
|
|
||||||
// Simply call onack for acknowledgements
|
// Simply call onack for acknowledgements
|
||||||
stream.onack = function(message, code) {
|
stream.onack = function(status) {
|
||||||
if (guac_writer.onack)
|
if (guac_writer.onack)
|
||||||
guac_writer.onack(message, code);
|
guac_writer.onack(status);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,9 +64,7 @@ Guacamole.StringWriter = function(stream) {
|
|||||||
/**
|
/**
|
||||||
* Fired for received data, if acknowledged by the server.
|
* Fired for received data, if acknowledged by the server.
|
||||||
* @event
|
* @event
|
||||||
* @param {String} message A human-readable status message related to the
|
* @param {Guacamole.Status} status The status of the operation.
|
||||||
* operation performed.
|
|
||||||
* @param {Number} code The error code associated with the operation.
|
|
||||||
*/
|
*/
|
||||||
this.onack = null;
|
this.onack = null;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user