cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Richard Atterer <richard_at_2005.atterer.net>
Date: Mon, 31 Jan 2005 11:32:07 +0100

Hi,

On Mon, Jan 31, 2005 at 12:36:15AM +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.

Cool, that would make my glibcurl code a bit more efficient. Currently, it
repeatedly calls FD_ISSET() in a loop and sets up things for glib's variant
of poll().

http://atterer.net/glibcurl/
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jigdo/jigdo/src/glibcurl/glibcurl.c?rev=HEAD

> So, without thinking too much I thought I'd throw out a first shot at
> this replacement function. I call it curl_multi_sock() (for now at
> least). I'm very interested in feedback. Would this work/be sufficient?

Is there any reason why you want to allocate extra memory? Maybe it would
be more efficient to allow users to pass in a pointer to a function, which
is called for each socket?

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯
Received on 2005-01-31