1gnutls_heartbeat_ping(3) gnutls gnutls_heartbeat_ping(3)
2
3
4
6 gnutls_heartbeat_ping - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_heartbeat_ping(gnutls_session_t session, size_t data_size,
12 unsigned int max_tries, unsigned int flags);
13
15 gnutls_session_t session
16 is a gnutls_session_t type.
17
18 size_t data_size
19 is the length of the ping payload.
20
21 unsigned int max_tries
22 if flags is GNUTLS_HEARTBEAT_WAIT then this sets the number
23 of retransmissions. Use zero for indefinite (until time‐
24 out).
25
26 unsigned int flags
27 if GNUTLS_HEARTBEAT_WAIT then wait for pong or timeout
28 instead of returning immediately.
29
31 This function sends a ping to the peer. If the flags is set to
32 GNUTLS_HEARTBEAT_WAIT then it waits for a reply from the peer.
33
34 Note that it is highly recommended to use this function with the flag
35 GNUTLS_HEARTBEAT_WAIT, or you need to handle retransmissions and time‐
36 outs manually.
37
38 The total TLS data transmitted as part of the ping message are given by
39 the following formula: MAX(16, data_size )+gnutls_record_over‐
40 head_size()+3.
41
43 GNUTLS_E_SUCCESS on success, otherwise a negative error code.
44
46 3.1.2
47
49 Report bugs to <bugs@gnutls.org>.
50 Home page: https://www.gnutls.org
51
52
54 Copyright © 2001-2020 Free Software Foundation, Inc., and others.
55 Copying and distribution of this file, with or without modification,
56 are permitted in any medium without royalty provided the copyright
57 notice and this notice are preserved.
58
60 The full documentation for gnutls is maintained as a Texinfo manual.
61 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
62 visit
63
64 https://www.gnutls.org/manual/
65
66gnutls 3.6.13 gnutls_heartbeat_ping(3)