Add onsync handler.

This commit is contained in:
Michael Jumper
2013-09-27 17:03:49 -07:00
parent a0f5ccbcf0
commit 56c6c1d637

View File

@@ -751,6 +751,17 @@ Guacamole.Client = function(tunnel) {
*/
this.onfile = null;
/**
* Fired whenever a sync instruction is received from the server, indicating
* that the server is finished processing any input from the client and
* has sent any results.
*
* @event
* @param {Number} timestamp The timestamp associated with the sync
* instruction.
*/
this.onsync = null;
// Layers
function getBufferLayer(index) {
@@ -1376,6 +1387,10 @@ Guacamole.Client = function(tunnel) {
if (currentState == STATE_WAITING)
setState(STATE_CONNECTED);
// Call sync handler if defined
if (guac_client.onsync)
guac_client.onsync(timestamp);
},
"transfer": function(parameters) {