File: gnutls_system_recv_timeout

package info (click to toggle)
gnutls28 3.8.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 81,572 kB
  • sloc: ansic: 390,000; asm: 117,804; sh: 18,712; makefile: 6,754; yacc: 1,858; python: 1,399; cpp: 1,243; perl: 995; sed: 16
file content (20 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20




@deftypefun {int} {gnutls_system_recv_timeout} (gnutls_transport_ptr_t @var{ptr}, unsigned int @var{ms})
@var{ptr}: A file descriptor (wrapped in a gnutls_transport_ptr_t pointer)

@var{ms}: The number of milliseconds to wait.

Wait for data to be received from the provided socket ( @code{ptr} ) within a
timeout period in milliseconds, using @code{select()}  on the provided  @code{ptr} .

This function is provided as a helper for constructing custom
callbacks for @code{gnutls_transport_set_pull_timeout_function()} ,
which can be used if you rely on socket file descriptors.

Returns -1 on error, 0 on timeout, positive value if data are available for reading.

@strong{Since:} 3.4.0
@end deftypefun