cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl don't write data directly (internal buffering?)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 5 Oct 2012 23:27:29 +0200 (CEST)

On Wed, 3 Oct 2012, Eric Beuque wrote:

Stop the top-posting. Stop resending the same mail.

> Hi, thank you again for your help, i tried the curl debug function but it's
> the same as the write callback, so i think there it's probably a cache in
> the TCP layer.

TCP has no "cache", but a TCP connection involves two sides and both sides
have buffers in use.

> What is surprising me, as i told, is that when i shutdown my server, libcurl
> goes to the write data callback around 6-7 frame (so 6-7 second). How can we
> explain that libcurl still receive data while the connection with the server
> is closed?

When the server closes the connection the data is probably forced out. Fire up
wireshark and look at the traffic and you can see for yourself!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-05