cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: a curl_multi_fdset() replacement? (TODO-RELEASE #55)

From: Daniel Haude <dunno_at_stoptrick.com>
Date: Mon, 31 Jan 2005 14:36:32 +0100

Daniel Stenberg wrote:

> In order to completely get rid of the FD_SETSIZE related problems from
> libcurl, we need to provide a function in the multi interface that
> exports a set of file descriptors (sockets) that an application should
> wait for actions on. It would then not force the app to use select(),
> but poll() or other available functions can be used instead.

It's funny that this message arrives just now that I'm literally on the
brink of embarking on my first libcurl project that was going to use
multiple handles and select(). I've never used select() and have spent
some time reading up on it -- I think I've got the concept now.

My app was going to use several libcurl handles and one socket of an
incoming connection from a client program. My idea was to pack all that
into a big loop around a single select() call. Whenever select()
returns, I'd check if the data came from some libcurl handle or from the
other socket, then do with it whatever had to be done, and then sit on
select() again.

Now I hear that select() isn't the way to go. I know that the discussion
  is beyond the scope of this list, but if someone could point me to the
relevant sources of information on the Net I'd be grateful.

Thanks, --Daniel
Received on 2005-01-31