1gnutls_transport_set_pull_timeout_gfnuungtcnltusit_oltnsr(a3n)sport_set_pull_timeout_function(3)
2
3
4

NAME

6       gnutls_transport_set_pull_timeout_function - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void  gnutls_transport_set_pull_timeout_function(gnutls_session_t  ses‐
12       sion, gnutls_pull_timeout_func func);
13

ARGUMENTS

15       gnutls_session_t session
16                   is a gnutls_session_t type.
17
18       gnutls_pull_timeout_func func
19                   a callback function
20

DESCRIPTION

22       This is the function where you  set  a  function  for  gnutls  to  know
23       whether  data are ready to be received. It should wait for data a given
24       time frame in milliseconds. The callback should return 0 on timeout,  a
25       positive  number if data can be received, and -1 on error.  You'll need
26       to override this function if select() is not suitable for the  provided
27       transport calls.
28
29       As  with select(), if the timeout value is zero the callback should re‐
30       turn zero if no data  are  immediately  available.  The  special  value
31       GNUTLS_INDEFINITE_TIMEOUT  indicates  that the callback should wait in‐
32       definitely for data.
33
34        gnutls_pull_timeout_func  is  of  the  form,  int  (*gnutls_pull_time‐
35       out_func)(gnutls_transport_ptr_t, unsigned int ms);
36
37       This  callback  is  necessary  when  gnutls_handshake_set_timeout()  or
38       gnutls_record_set_timeout() are set, under TLS1.3 and for enforcing the
39       DTLS mode timeouts when in blocking mode.
40
41       For compatibility with future GnuTLS versions this callback must be set
42       when a custom pull function is registered. The  callback  will  not  be
43       used  when  the  session is in TLS mode with non-blocking sockets. That
44       is,  when  GNUTLS_NONBLOCK  is  specified  for   a   TLS   session   in
45       gnutls_init().
46
47       The  helper  function  gnutls_system_recv_timeout() is provided to sim‐
48       plify writing callbacks.
49

SINCE

51       3.0
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: https://www.gnutls.org
56
57
59       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
60       Copying and distribution of this file, with  or  without  modification,
61       are  permitted in any medium without royalty provided the copyright no‐
62       tice and this notice are preserved.
63

SEE ALSO

65       The full documentation for gnutls is maintained as  a  Texinfo  manual.
66       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
67       visit
68
69       https://www.gnutls.org/manual/
70
71gnutls                           gnut3l.s8_.t2ransport_set_pull_timeout_function(3)
Impressum