cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Use of Poll

From: codemastr <codemstr_at_ptd.net>
Date: Mon, 26 Jul 2004 14:28:32 -0400

> Has there been any thought of porting curl to use poll()?
How would this work with the multi interface? Right now, libcurl returns the
fd_set, and the host app select()'s on it. Would there then need to also be
a function to receive a pollfd struct? And then of course someone will want
epoll, and /dev/poll, and SIGIO, etc. So you'd wind up with a dozen
functions to complete a single purpose. Plus, for API completeness, libcurl
needs to still make these functions available on all systems (even though
they won't work). So that means you have to go add "stubs" for the pollfd
struct et al. I'd like to see poll() support too, but the only way I can
think of implementing it is pretty messy.

>The use of select() limits the number of filehandles...
No matter what you use, the system always enforces a limit on file
descriptors. In Linux, there is a hard and soft limit in limits.conf, in
BSD, there are limits in sysctl. Even if you are using poll, those limits
still exist. The only thing that doesn't exist is the FD_SETSIZE limitation.
However, FD_SETSIZE can be changed at compile time, so that's not too much
of a limitation.

Dominick Meglio
Received on 2004-07-26

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET