cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: a non-blocking IPv6 connect problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 2 Oct 2001 19:17:06 +0200 (MET DST)

On Tue, 2 Oct 2001, Bjorn Reese wrote:

> Forgot to cc: the mailinglist (why isn't reply-to set?)

It isn't set because a) someone on sourceforge took them away on all lists
(probably by mistake while upgrading or something) b) I haven't set them back
on because I'm lazy and I've gotten sick on that discussion on every mailing
list, I mean if the Reply-To: header was invented by Satan or if it actually
is useful.

> What you must do is to keep track of whether or not the connection has
> been established (or rejected). If select() says that the socket is
> readable, and you have not established the connection yet, then you must
> retrieve the error code from the socket. If it is 0 (zero) or EISCONN
> then the connection has been successfully established, otherwise it has
> been rejected and the error code will tell you why.

Awesome. This was it! Except for the very minor little detail that select()
says the socket is writable...

> I believe this does the trick. For a full example see the Triacle code
> (socket.c / SocketCallbackConnecting & SocketGetError)

I took a handfull of inspiration from there and now it works the way I want!
Now I'll have a 7.9.1 pre-release out really soon.

The socket-fiddler-award 2001 goes to you, Bjørn! *thanks*

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-02