help-gnutls
[Top][All Lists]
Advanced

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

Re: [Help-gnutls] gnutls and non blocking socket


From: Nikos Mavrogiannopoulos
Subject: Re: [Help-gnutls] gnutls and non blocking socket
Date: Wed, 13 Jul 2005 18:17:58 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

Regit wrote:

Ok, I give some explanation of my problem : Under windows (as it is not implemented under Linux) I've created a
socket with a RECV timeout.
I do a gnutls_record_recv on a TLS session built over the socket.
When the timeout expires, I try to send a packet with gnutls_record_send
on that TLS session. The point is that at this moment gnutls_record_send
always fail sending a -10 error (TLS session not correct).

I may have look in the bad place in the code but it seems that there's a
problem anyway.

I don't think there is. Most probably you are using SO_RCVTIMEO to
setsockopt, so you get something different as errno than EAGAIN or
EINTR. This is like a BSD extension and I don't know if this can be
handled by gnutls in a portable way. As a quick hack you could make
a wrapper over recv() and return EINTR or EAGAIN when you get the
timeout errno code.


Nikos






reply via email to

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