mike-jumper commented on a change in pull request #228:
URL: https://github.com/apache/guacamole-server/pull/228#discussion_r448148969
##########
File path: src/libguac/guacamole/socket.h
##########
@@ -136,11 +136,25 @@ void guac_socket_free(guac_socket* socket);
* to ensure neither side of the socket times out while the socket is open.
* This ping will take the form of a "nop" instruction.
*
+ * @deprecated
+ * Manually starting the keep alive process on sockets is no longer
+ * necessary, as the sockets enable the "nop" ping by default.
+ *
* @param socket
* The guac_socket to declare as requiring an automatic keep-alive ping.
*/
void guac_socket_require_keep_alive(guac_socket* socket);
+/**
+ * Enables the keep-alive ping functionality on the given socket, causing it
+ * to automatically send a "nop" instruction ping periodically while the
+ * socket is open.
+ *
+ * @param socket
+ * The guac_socket on which to enable the automatic keep-alive ping.
+ */
+void guac_socket_enable_keep_alive(guac_socket* socket);
Review comment:
Well ... internally, yes, I agree it's more of an "enable" than a
"require".
The idea behind the original `guac_socket_require_keep_alive()` naming was
to define that function as a means of declaring a requirement, rather than
imposing a specific method for socket implementations to satisfy that
requirement, decoupling the statement of need from how/whether the need is met.
Admittedly, the wording in the documentation of
`guac_socket_require_keep_alive()` which explicitly specifies a "keep-alive
ping" and states that "this ping will take the form of a "nop" instruction"
probably defeats that intent.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]