mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Add onsync handler.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user