cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Disabling keepalive not working?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 20 Apr 2013 23:34:34 +0200 (CEST)

On Sat, 20 Apr 2013, Igor Sverkos wrote:

> I am trying to deactivate keepalive but I am not sure if it is really
> deactivated -- would say no:

I think this is because of a misunderstanding about what the option does.

--no-keepalive is clearly documented that it "Disables the use of keepalive
messages on the TCP connection, as by default curl enables them".

What may be less clear is that the "keepalive messages" it talks about is
TCP-level "chatter" that makes the connection get used instead of remaining
completely idle when nothing is being sent over it. See
http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html

You seem to be after preventing libcurl to use persistend connections so that
it won't keep connections open for subsequent re-use. That's not what the
--no-keepalive option is about - and we should probably improve the
documentation to clarify this.

The curl tool actually has no option that can forcible make a connection not
being tried for re-use afterward. libcurl has, but that ability has never been
exposed by the tool since we haven't had any reason to.

Can you elaborate a little on why you want to do this?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-04-20