Blame doc/functions/gnutls_heartbeat_ping

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_heartbeat_ping} (gnutls_session_t @var{session}, size_t @var{data_size}, unsigned int @var{max_tries}, unsigned int @var{flags})
Packit Service 4684c1
@var{session}: is a @code{gnutls_session_t}  type.
Packit Service 4684c1
Packit Service 4684c1
@var{data_size}: is the length of the ping payload.
Packit Service 4684c1
Packit Service 4684c1
@var{max_tries}: if flags is @code{GNUTLS_HEARTBEAT_WAIT}  then this sets the number of retransmissions. Use zero for indefinite (until timeout).
Packit Service 4684c1
Packit Service 4684c1
@var{flags}: if @code{GNUTLS_HEARTBEAT_WAIT}  then wait for pong or timeout instead of returning immediately.
Packit Service 4684c1
Packit Service 4684c1
This function sends a ping to the peer. If the  @code{flags} is set
Packit Service 4684c1
to @code{GNUTLS_HEARTBEAT_WAIT}  then it waits for a reply from the peer.
Packit Service 4684c1
Packit Service 4684c1
Note that it is highly recommended to use this function with the
Packit Service 4684c1
flag @code{GNUTLS_HEARTBEAT_WAIT} , or you need to handle retransmissions
Packit Service 4684c1
and timeouts manually.
Packit Service 4684c1
Packit Service 4684c1
The total TLS data transmitted as part of the ping message are given by
Packit Service 4684c1
the following formula: MAX(16,  @code{data_size} )+@code{gnutls_record_overhead_size()} +3.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} @code{GNUTLS_E_SUCCESS}  on success, otherwise a negative error code.
Packit Service 4684c1
Packit Service 4684c1
@strong{Since:} 3.1.2
Packit Service 4684c1
@end deftypefun