cURL / Mailing Lists / curl-library / Single Mail


Re: Modification of curl_multi_fdset()

From: Alexey Simak <>
Date: Tue, 10 Jun 2008 13:43:17 +0300

> BTW, will you update the patch and provide a docs update with it?

We need a patch which resolve both issues:
1) fill somehow exc_fd_set which we pass to select;
2) get info if there is any fd in write_fd_set returned from

If you do not like idea to fill exc_fd_set in curl_multi_fdset()
may be we can consider some other options? For example introduce
a new function like that:

CURL_EXTERN CURLMcode curl_multi_fdset2(CURLM* multi_handle,
                                        fd_set* read_fd_set,
                                        int* read_fd_set_count,
                                        fd_set* write_fd_set,
                                        int* write_fd_set_count,
                                        fd_set* exc_fd_set,
                                        int* exc_fd_set_count,
                                        int* max_fd);

It'd be different from the existing one by
1) You'd be able to pass NULL for any fd_set/int pair (this way you
could query for writable sockets only, for example)
2) It'd populate exc_fd_set, if passed
3) It'd populate a count for each set passed

Any other ideas are welcomed.

Received on 2008-06-10