cURL / Mailing Lists / curl-library / Single Mail

curl-library

Extacting FDs higher than FD_SETSIZE from the multi interface

From: Shoal, Aaron <ashoal_at_qti.qualcomm.com>
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?

Thanks
Aaron

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-11