cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: connect failed if set socket non-blocking,why?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 25 Oct 2004 14:55:13 +0200 (CEST)

On Mon, 25 Oct 2004, [utf-8] ??? wrote:

>> Yes, connect() can return -1 with errno set to 0. The program then needs to
>> deal with it. libcurl does.

> The curl's mechanism is : after curl called connect(), if Curl_ourerrno()
> return errno is EINPROGRESS or EWOULDBLOCK , then it can use select()
> to do further job.

or EAGAIN. But you are right and I was wrong before: if errno is zero when
connect() returns -1 we take that as a connect failure.

I take it this is still under Unixware? What does the man pages/system
documentation say. Especially Andy Hobbs' remarks needs to be used if the docs
says so. Perhaps libcurl is wrongly built without the use of one of those
necessary symbols?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-10-25