curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: curl_multi_timeout and the multi_socket API

From: Henrik Holst via curl-library <>
Date: Fri, 2 Apr 2021 23:38:13 +0200

Den fre 2 apr. 2021 kl 23:12 skrev Daniel Stenberg <>:

> On Fri, 2 Apr 2021, Henrik Holst wrote:
> >> If you use poll() then the multi socket API is probably the wrong
> choice.
> >> The multi socket API is for event-based handling.
> >>
> > Okey, but the very same thing happens with epoll, or are we only
> defining
> > event-based handling as say libevent, libev and libuv?
> What "very same thing" is it that happens?

For epoll, the "very same thing" is that if a non-curl socket is added to
the epoll efd then epoll_wait() would just like poll() enter a situation
where it might not return 0 to indicate timeout.

> What do you do with the timeout value curl_multi_timeout returns in an
> event-based system?
for epoll I would pass that on as the timeout argument for epoll_wait().


> --
> /
> | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> |

Received on 2021-04-02