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
30       return zero if no data are immediately  available.  The  special  value
31       GNUTLS_INDEFINITE_TIMEOUT  indicates  that  the  callback  should  wait
32       indefinitely 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, and for calculating the DTLS  mode
39       timeouts.
40
41       In  short,  this  callback should be set when a custom pull function is
42       registered. The callback will not be used when the session  is  in  TLS
43       mode with non-blocking sockets. That is, when GNUTLS_NONBLOCK is speci‐
44       fied for a TLS session in gnutls_init(). For compatibility with  future
45       GnuTLS  versions  it  is recommended to always set this function when a
46       custom pull function is registered.
47
48       The helper function gnutls_system_recv_timeout() is  provided  to  sim‐
49       plify writing callbacks.
50

SINCE

52       3.0
53

REPORTING BUGS

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

SEE ALSO

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