mike-jumper commented on code in PR #764:
URL: https://github.com/apache/guacamole-client/pull/764#discussion_r982704186


##########
guacamole-common-js/src/main/webapp/modules/Tunnel.js:
##########
@@ -907,6 +917,20 @@ Guacamole.WebSocketTunnel = function(tunnelURL) {
 
     }
 
+    /**
+     * Sends an internal "ping" instruction to the Guacamole WebSocket
+     * endpoint, verifying network connection stability. If the network is
+     * stable, the Guacamole server will receive this instruction and respond
+     * with an identical ping.
+     *
+     * @private
+     */
+    var sendPing = function sendPing() {
+        var currentTime = new Date().getTime();
+        tunnel.sendMessage(Guacamole.Tunnel.INTERNAL_DATA_OPCODE, 'ping', 
currentTime);
+        lastSentPing = currentTime;
+    };
+
     /**
      * Initiates a timeout which, if data is not received, causes the tunnel

Review Comment:
   Re-documented and cleaned up with commit 
7f2ea222bba635b8ccb24316a8675b11343df386.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to