summaryrefslogtreecommitdiffstats
path: root/doc/functions/gnutls_heartbeat_ping
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:33:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 07:33:12 +0000
commit36082a2fe36ecd800d784ae44c14f1f18c66a7e9 (patch)
tree6c68e0c0097987aff85a01dabddd34b862309a7c /doc/functions/gnutls_heartbeat_ping
parentInitial commit. (diff)
downloadgnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.tar.xz
gnutls28-36082a2fe36ecd800d784ae44c14f1f18c66a7e9.zip
Adding upstream version 3.7.9.upstream/3.7.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/functions/gnutls_heartbeat_ping')
-rw-r--r--doc/functions/gnutls_heartbeat_ping27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/functions/gnutls_heartbeat_ping b/doc/functions/gnutls_heartbeat_ping
new file mode 100644
index 0000000..490c6e0
--- /dev/null
+++ b/doc/functions/gnutls_heartbeat_ping
@@ -0,0 +1,27 @@
+
+
+
+
+@deftypefun {int} {gnutls_heartbeat_ping} (gnutls_session_t @var{session}, size_t @var{data_size}, unsigned int @var{max_tries}, unsigned int @var{flags})
+@var{session}: is a @code{gnutls_session_t} type.
+
+@var{data_size}: is the length of the ping payload.
+
+@var{max_tries}: if flags is @code{GNUTLS_HEARTBEAT_WAIT} then this sets the number of retransmissions. Use zero for indefinite (until timeout).
+
+@var{flags}: if @code{GNUTLS_HEARTBEAT_WAIT} then wait for pong or timeout instead of returning immediately.
+
+This function sends a ping to the peer. If the @code{flags} is set
+to @code{GNUTLS_HEARTBEAT_WAIT} then it waits for a reply from the peer.
+
+Note that it is highly recommended to use this function with the
+flag @code{GNUTLS_HEARTBEAT_WAIT} , or you need to handle retransmissions
+and timeouts manually.
+
+The total TLS data transmitted as part of the ping message are given by
+the following formula: MAX(16, @code{data_size} )+@code{gnutls_record_overhead_size()} +3.
+
+@strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, otherwise a negative error code.
+
+@strong{Since:} 3.1.2
+@end deftypefun