jmuehlner commented on code in PR #764:
URL: https://github.com/apache/guacamole-client/pull/764#discussion_r982690664
##########
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:
This comment really does not capture the totality of what's going on in this
function. Would you mind adding a bit more detail here?
--
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]