curl / Mailing Lists / curl-users / 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: How does early error response detection work?

From: Daniel Stenberg via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 26 May 2020 09:40:45 +0200 (CEST)

On Mon, 25 May 2020, Osipov, Michael via curl-users wrote:

>> Reading and writing are handled separately and independently. EAGAIN on
>> send() will make it wait until it can write again until it retries and the
>> same thing for recv().
>
> This explains what I see in truss. But how do you notify from recv() that
> send() shall stop sending if both operate separately and independently?

They're independent but curl of course knows how to associate them with each
other and for example if it receives a HTTP response error before it has sent
all the request data, it can opt to stop sending the rest of the data if the
correct conditions are met.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-26