1gnutls_bye(3)                       gnutls                       gnutls_bye(3)
2
3
4

NAME

6       gnutls_bye - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how);
12

ARGUMENTS

14       gnutls_session_t session
15                   is a gnutls_session_t structure.
16
17       gnutls_close_request_t how
18                   is an integer
19

DESCRIPTION

21       Terminates  the  current TLS/SSL connection. The connection should have
22       been  initiated  using  gnutls_handshake().   how  should  be  one   of
23       GNUTLS_SHUT_RDWR, GNUTLS_SHUT_WR.
24
25       In case of GNUTLS_SHUT_RDWR then the TLS connection gets terminated and
26       further receives and sends will be disallowed.  If the return value  is
27       zero  you may continue using the connection.  GNUTLS_SHUT_RDWR actually
28       sends an alert containing a close request and waits  for  the  peer  to
29       reply with the same message.
30
31       In  case  of GNUTLS_SHUT_WR then the TLS connection gets terminated and
32       further sends will be disallowed. In order to reuse the connection  you
33       should  wait  for  an EOF from the peer.  GNUTLS_SHUT_WR sends an alert
34       containing a close request.
35
36       Note that not all implementations will properly terminate a TLS connec‐
37       tion.   Some  of  them, usually for performance reasons, will terminate
38       only the underlying transport layer, thus causing a transmission  error
39       to the peer.  This error cannot be distinguished from a malicious party
40       prematurely terminating the session, thus this behavior is  not  recom‐
41       mended.
42
43       This  function  may also return GNUTLS_E_AGAIN or GNUTLS_E_INTERRUPTED;
44       cf.  gnutls_record_get_direction().
45

RETURNS

47       GNUTLS_E_SUCCESS on success, or an error code, see function  documenta‐
48       tion for entire semantics.
49

REPORTING BUGS

51       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
52       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
53       http://www.gnu.org/gethelp/
54
56       Copyright © 2008 Free Software Foundation.
57       Copying  and  distribution  of this file, with or without modification,
58       are permitted in any medium  without  royalty  provided  the  copyright
59       notice and this notice are preserved.
60

SEE ALSO

62       The  full  documentation  for gnutls is maintained as a Texinfo manual.
63       If the info and gnutls programs are properly installed  at  your  site,
64       the command
65
66              info gnutls
67
68       should give you access to the complete manual.
69
70
71
72gnutls                             2.12.6.1                      gnutls_bye(3)
Impressum