gnutls_record_recv timeout with blocking sockets

Giuseppe Scrivano gscrivano at gnu.org
Wed May 25 23:00:23 CEST 2011


Nikos Mavrogiannopoulos <nmav at gnutls.org> writes:

> Then, as Sam mentioned, there is not much gnutls can do. That could
> be either because of the bugs mentioned by Sam, or because gnutls is
> blocked waiting for a TLS record. The ways to avoid this would be
> either by using non-blocking sockets or by having a timeout in the
> recv function provided to gnutls.

AFAICS, it wouldn't work with non-blocking sockets; while you can
respect the timeout, it will break any time consecutive `read' don't
have enough data to consume.  I guess the latter is the only reasonable
solution.

Cheers,
Giuseppe




More information about the Gnutls-devel mailing list