cURL / Mailing Lists / curl-library / Single Mail


Extacting FDs higher than FD_SETSIZE from the multi interface

From: Shoal, Aaron <>
Date: Mon, 11 Feb 2013 02:56:21 +0000

[resending as I hadn't confirmed my subscription before sending this originally. Sorry if this shows up twice.]

I'm working on a load tool that simulates several thousands of users, each issuing HTTP requests concurrent to one another.

I've elected to use poll() due to the large number of concurrent connections. Prior to release 7.23.0, Curl_multi_fdset() didn't check for FD_SETSIZE. That allowed me to extract FDs higher than FD_SETSIZE by checking the value of maxfd after calling that function, which I would do after sending a new HTTP request. In 7.23.0 a check for FD_SETSIZE was added to prevent overflow when bits of the passed-in fd_set were set. I was compensating for that in my code with a buffer.

Obviously curl has no problem using FDs with values higher than FD_SETSIZE, but how do I obtain those FDs for use with my polling implementation?


List admin:
Received on 2013-02-11