File: gnutls_heartbeat_ping

package info (click to toggle)
gnutls28 3.3.8-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 51,388 kB
  • sloc: ansic: 191,357; asm: 60,370; sh: 21,457; makefile: 5,257; lisp: 1,531; yacc: 1,254; cpp: 1,155; perl: 199; sed: 16
file content (24 lines) | stat: -rw-r--r-- 960 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24




@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}  structure.

@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.

@strong{Returns:} @code{GNUTLS_E_SUCCESS}  on success, otherwise a negative error code.

@strong{Since:} 3.1.2
@end deftypefun