|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@deftypefun {void} {gnutls_transport_set_pull_timeout_function} (gnutls_session_t @var{session}, gnutls_pull_timeout_func @var{func})
|
|
Packit Service |
4684c1 |
@var{session}: is a @code{gnutls_session_t} type.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@var{func}: a callback function
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This is the function where you set a function for gnutls to know
|
|
Packit Service |
4684c1 |
whether data are ready to be received. It should wait for data a
|
|
Packit Service |
4684c1 |
given time frame in milliseconds. The callback should return 0 on
|
|
Packit Service |
4684c1 |
timeout, a positive number if data can be received, and -1 on error.
|
|
Packit Service |
4684c1 |
You'll need to override this function if @code{select()} is not suitable
|
|
Packit Service |
4684c1 |
for the provided transport calls.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
As with @code{select()} , if the timeout value is zero the callback should return
|
|
Packit Service |
4684c1 |
zero if no data are immediately available. The special value
|
|
Packit Service |
4684c1 |
@code{GNUTLS_INDEFINITE_TIMEOUT} indicates that the callback should wait indefinitely
|
|
Packit Service |
4684c1 |
for data.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@code{gnutls_pull_timeout_func} is of the form,
|
|
Packit Service |
4684c1 |
int (*gnutls_pull_timeout_func)(gnutls_transport_ptr_t, unsigned int ms);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
This callback is necessary when @code{gnutls_handshake_set_timeout()} or
|
|
Packit Service |
4684c1 |
@code{gnutls_record_set_timeout()} are set, under TLS1.3 and for enforcing the DTLS
|
|
Packit Service |
4684c1 |
mode timeouts when in blocking mode.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
For compatibility with future GnuTLS versions this callback must be set when
|
|
Packit Service |
4684c1 |
a custom pull function is registered. The callback will not be used when the
|
|
Packit Service |
4684c1 |
session is in TLS mode with non-blocking sockets. That is, when @code{GNUTLS_NONBLOCK}
|
|
Packit Service |
4684c1 |
is specified for a TLS session in @code{gnutls_init()} .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The helper function @code{gnutls_system_recv_timeout()} is provided to
|
|
Packit Service |
4684c1 |
simplify writing callbacks.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
@strong{Since:} 3.0
|
|
Packit Service |
4684c1 |
@end deftypefun
|