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: Hint: curl timeout simulation
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel F via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 02 Sep 2021 15:21:17 +0200
W dniu 2021-09-02 09:58, Daniel Stenberg via curl-library napisaĆ(a):
> On Wed, 1 Sep 2021, David Caul via curl-library wrote:
>
>> 1. can we simulate the curl timeout in code.
>
> Maybe just make a stub function that instead of calling libcurl
> returns CURLE_OPERATION_TIMEDOUT ?
If you are on Linux, you can use this function to shut down receiving
packets on given socket fd. For more details check "man 3 shutdown".
This is probably the easiest way to simulate network timeouts:
shutdown(fd, SHUT_RD);
Regards,
Daniel
Date: Thu, 02 Sep 2021 15:21:17 +0200
W dniu 2021-09-02 09:58, Daniel Stenberg via curl-library napisaĆ(a):
> On Wed, 1 Sep 2021, David Caul via curl-library wrote:
>
>> 1. can we simulate the curl timeout in code.
>
> Maybe just make a stub function that instead of calling libcurl
> returns CURLE_OPERATION_TIMEDOUT ?
If you are on Linux, you can use this function to shut down receiving
packets on given socket fd. For more details check "man 3 shutdown".
This is probably the easiest way to simulate network timeouts:
shutdown(fd, SHUT_RD);
Regards,
Daniel
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2021-09-02