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: connectimeout

From: vin9999 via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 07 Mar 2022 13:13:12 +0000

Hello,

I understand. Just wanted to double check if it was possible to set different connecttimeout settings for proxy vs remote url. (just if it connects, not about slow or data transfers). like 3 seconds to make a connection to the proxy (if fails abort) and then if this is oke 20 seconds connecttimeout to the remote url. (if fails abort) with different error codes.

We will do a work around, make some separate code (check socket open and can connect), at an interval, for the primary and secondary proxy. Then store this result. Then when we actually need to connect to the proxy with curl, we check this result if the proxy is up, and choose the primary or secondary.

Thank you very much for the help and replies!
V.




------- Original Message -------

On Sunday, March 6th, 2022 at 10:48 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sun, 6 Mar 2022, vin9999 wrote:
>
> > We use the php curl functions
> >
> > curl 7.29.0
>
> That's a version over nine years old, so you might find that a modern version
>
> might act slightly better. But it also struck me that for your examples you
>
> probably still will get CURLE_OPERATION_TIMEDOUT errors if the operation takes
>
> longer than 3 seconds and your timeout then aborts the transfer attempt.
>
> I don't think another CURLOPT_CONNECTTIMEOUT version would help you either
>
> since in the case of using a proxy, a client like curl can't tell exactly
>
> which one that is slow; the proxy or the remote server.
>
> --
>
> / daniel.haxx.se
>
> | Commercial curl support up to 24x7 is available!
>
> | Private help, bug fixes, support, ports, new features
>
> | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-07