help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] gnutls_bye(), return values, and looping


From: Nikos Mavroyanopoulos
Subject: Re: [Help-gnutls] gnutls_bye(), return values, and looping
Date: Mon, 2 Feb 2004 17:47:23 +0200
User-agent: Internet Messaging Program (IMP) 3.2.2

Quoting Joe Shaw <address@hidden>:

> On Sun, 2004-02-01 at 15:09, Nikos Mavroyanopoulos wrote:
> > GNUTLS_E_AGAIN is returned because the underlying layer (recv or send)
> > returned EAGAIN. gnutls does not use this error value.
> Ok, recv(2) says that EAGAIN would be returned if the socket was
> nonblocking (which it is) and there are no messages to be read.  Is it
> safe then to ignore the GNUTLS_E_AGAIN value (and therefore check only
> GNUTLS_E_INTERRUPTED) and then close the file descriptor?  Are the
> examples in the docs correct in ignoring the return values?
The examples in the documentation are with blocking servers
(and the error checking is almost inexistant). To avoid this
case you could use gnutls_bye() with _WR only and either
wait for an EOF from gnutls_recv() or just close the socket.

> Thanks,
> Joe

-- 
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]