Blame doc/functions/gnutls_record_get_direction

Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
@deftypefun {int} {gnutls_record_get_direction} (gnutls_session_t @var{session})
Packit Service 4684c1
@var{session}: is a @code{gnutls_session_t}  type.
Packit Service 4684c1
Packit Service 4684c1
This function is useful to determine whether a GnuTLS function was interrupted
Packit Service 4684c1
while sending or receiving, so that @code{select()}  or @code{poll()}  may be called appropriately.
Packit Service 4684c1
Packit Service 4684c1
It provides information about the internals of the record
Packit Service 4684c1
protocol and is only useful if a prior gnutls function call,
Packit Service 4684c1
e.g.  @code{gnutls_handshake()} , was interrupted and returned
Packit Service 4684c1
@code{GNUTLS_E_INTERRUPTED}  or @code{GNUTLS_E_AGAIN} . After such an interrupt
Packit Service 4684c1
applications may call @code{select()}  or @code{poll()}  before restoring the
Packit Service 4684c1
interrupted GnuTLS function.
Packit Service 4684c1
Packit Service 4684c1
This function's output is unreliable if you are using the same
Packit Service 4684c1
 @code{session} in different threads for sending and receiving.
Packit Service 4684c1
Packit Service 4684c1
@strong{Returns:} 0 if interrupted while trying to read data, or 1 while trying to write data.
Packit Service 4684c1
@end deftypefun