cURL / Mailing Lists / curl-library / Single Mail


Re: Is there a counterpart of curl_multi_fdset to UNset fd's?

From: Daniel Stenberg <>
Date: Tue, 8 Jul 2014 00:13:43 +0200 (CEST)

On Mon, 7 Jul 2014, Federico Vitali wrote:

> Is there a way to unset file descriptors associated with a curl
> multihandle?

I don't get why you want that. You handle your descriptors, and you can have
libcurl add its descriptors. Why would you remove any?

> I need that because I have to add curl fd's to an already existing set.

The function was designed to offer that. As the docs says "curl_multi_fdset()
only adds its own descriptors". So you can set your own descriptors first and
then ask libcurl to add its descriptors and you can then select() on the whole
set in a single call.

> And another question: is there a way to get a fd of a specific curl handle
> of a multi handle set?

No, but I would be interested in learning why you would want that? When you
use the multi API you work on all the transfers at once and several easy
handles can even (at times) share one or more file descriptors.

List admin:
Received on 2014-07-08