File: gnutls_record_get_direction

package info (click to toggle)
gnutls28 3.8.9-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,872 kB
  • sloc: ansic: 388,071; asm: 117,804; sh: 18,477; makefile: 6,732; yacc: 1,858; python: 1,399; cpp: 1,243; perl: 995; sed: 16
file content (22 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22




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

This function is useful to determine whether a GnuTLS function was interrupted
while sending or receiving, so that @code{select()}  or @code{poll()}  may be called appropriately.

It 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 and returned
@code{GNUTLS_E_INTERRUPTED}  or @code{GNUTLS_E_AGAIN} . After such an interrupt
applications may 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