



@deftypefun {int} {gnutls_record_get_direction} (gnutls_session_t @var{session})
@var{session}: is a @code{gnutls_session_t}  type.

This function provides information about the internals of the
record protocol and is only useful if a prior gnutls function call,
e.g.  @code{gnutls_handshake()} , was interrupted for some reason. That
is, if a function returned @code{GNUTLS_E_INTERRUPTED}  or
@code{GNUTLS_E_AGAIN} . In such a case, you might want to call @code{select()} 
or @code{poll()}  before restoring the interrupted gnutls function.

This function's output is unreliable if you are using the same
 @code{session} in different threads, for sending and receiving.

@strong{Returns:} 0 if interrupted while trying to read data, or 1 while trying to write data.
@end deftypefun
