Function: gnutls-bye
gnutls-bye is a function defined in gnutls.c.
Signature
(gnutls-bye PROC CONT)
Documentation
Terminate current GnuTLS connection for process PROC.
The connection should have been initiated using gnutls-handshake.
If CONT is not nil the TLS connection gets terminated and further receives and sends will be disallowed. If the return value is zero you may continue using the connection. If CONT is nil, GnuTLS actually sends an alert containing a close request and waits for the peer to reply with the same message. In order to reuse the connection you should wait for an EOF from the peer.
This function may also return gnutls-e-again, or
gnutls-e-interrupted.
Source Code
// Defined in /usr/src/emacs/src/gnutls.c
{
gnutls_session_t state;
int ret;
CHECK_PROCESS (proc);
state = XPROCESS (proc)->gnutls_state;
if (XPROCESS (proc)->gnutls_certificates)
gnutls_deinit_certificates (XPROCESS (proc));
ret = gnutls_bye (state, NILP (cont) ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR);
return gnutls_make_error (ret);
}