|
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 asocket 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
[Prev in Thread] | Current Thread | [Next in Thread] |