Migrate to cleaner InputStream and OutputStream with Reader wrappers.

This commit is contained in:
Michael Jumper
2014-02-28 15:25:01 -08:00
parent beb9e5c684
commit 71ae352208
7 changed files with 399 additions and 383 deletions

View File

@@ -43,17 +43,9 @@ Guacamole.OutputStream = function(client, index) {
*/
this.index = index;
/**
* Fired when the stream is being closed due to an error.
*
* @param {String} reason A human-readable reason describing the error.
* @param {Number} code The error code associated with the error.
*/
this.onerror = null;
/**
* Fired whenever an acknowledgement is received from the server, indicating
* that a stream operation has completed.
* that a stream operation has completed, or an error has occurred.
*
* @event
* @param {String} message A human-readable status message related to the
@@ -67,14 +59,14 @@ Guacamole.OutputStream = function(client, index) {
*
* @param {String} data The base64-encoded data to send.
*/
this.write = function(data) {
this.sendBlob = function(data) {
client.sendBlob(guac_stream.index, data);
};
/**
* Closes this stream.
*/
this.close = function() {
this.sendEnd = function() {
client.endStream(guac_stream.index);
};