



@deftypefun {void} {gnutls_transport_set_pull_timeout_function} (gnutls_session_t @var{session}, gnutls_pull_timeout_func @var{func})
@var{session}: is a @code{gnutls_session_t}  type.

@var{func}: a callback function

This is the function where you set a function for gnutls to know
whether data are ready to be received. It should wait for data a
given time frame in milliseconds. The callback should return 0 on 
timeout, a positive number if data can be received, and -1 on error.
You'll need to override this function if @code{select()}  is not suitable
for the provided transport calls.

As with @code{select()} , if the timeout value is zero the callback should return
zero if no data are immediately available.

 @code{gnutls_pull_timeout_func} is of the form,
int (*gnutls_pull_timeout_func)(gnutls_transport_ptr_t, unsigned int ms);

This callback is necessary when @code{gnutls_handshake_set_timeout()}  or 
@code{gnutls_record_set_timeout()}  are set. It will not be used when 
non-blocking sockets are in use. That is, this function will
not operate when @code{GNUTLS_NONBLOCK}  is specified in @code{gnutls_init()} , 
or a custom pull function is registered without updating the 
pull timeout function.

The helper function @code{gnutls_system_recv_timeout()}  is provided to
simplify writing callbacks. 

@strong{Since:} 3.0
@end deftypefun
