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: Question regarding passing CURL_SOCKET_TIMEOUT to multi_socket_action

From: Yongkang Huang via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 24 Oct 2021 18:16:32 +0000

Thanks Daniel! Some follow up questions:

For 1), will the CURLMOPT_TIMERFUNCTION callback called in this case?

For 2), that make a lot of sense, I know there’s some code indicating added easy handle error like CURLM_BAD_EASY_HANDLE, in this case how to know which easy handle is bad so we can remove from the multi without terminate other good handles? Also for

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sunday, October 24, 2021 at 3:38 AM
To: Yongkang Huang via curl-library <curl-library_at_lists.haxx.se>
Cc: Yongkang Huang <ykang_at_fb.com>
Subject: Re: Question regarding passing CURL_SOCKET_TIMEOUT to multi_socket_action
On Sun, 24 Oct 2021, Yongkang Huang via curl-library wrote:

> So is running_handle is 0 legit in this case that I should call
> curl_multi_info_read to read the result?

Yes. It means the transfer is already done.

> When a curl_multi_socket_action returns error code, should I just think all
> the existing easy handle added are failed and the multi handle cannot be
> used anymore? Or is there any recovery mechanism?

It probably depends on what error code you get in what situation. I don't
think there's a generic recovery mechanism that works for all, but you're
advised to act in the best way for your application.

--
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html<https://curl.se/support.html>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-10-24