cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: socket timeouts

From: Ben Kibbey <bjk_at_luxsci.net>
Date: Wed, 30 Jun 2010 19:08:07 -0400

On Thu, Jul 01, 2010 at 12:28:02AM +0200, Daniel Stenberg wrote:
> On Wed, 30 Jun 2010, Ben Kibbey wrote:
>
> >The problem is that the socket is set to non-blocking via
> >curlx_nonblock() so it doesn't seem possible to determine whether
> >the transfer timed out or there was no data available.
>
> I'm sorry I don't understand what you're trying to accomplish. What
> is the difference between "transfer timed out" and "there was no
> data available" ?

I'm trying to get libcurl to return an error when no data has been
received after some time. Similar I guess to a TCP timeout. My original
post mentioned the SO_RCVTIMEO setsockopt(2) but this cannot work, if I
understand the manual page correctly, because libcurl sets the socket to
non-blocking and the errno would be ambiguous to the non-blocking FD
(EAGAIN).

-- 
Ben Kibbey
Jabber: bjk AT thiessen DOT org - (bjk) FreeNode/OFTC
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-01