cURL / Mailing Lists / curl-users / Single Mail

curl-users

--tcp-keep* options (was Re: [PATCH] SOCKS4a support)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 8 Jan 2008 00:32:57 +0100 (CET)

On Fri, 4 Jan 2008, autrelandes-curl_at_yahoo.fr wrote:

> Please find enclosed a second proposition of a much simpler patch (file
> main.diff). I changed the set_so_keepalive function into a set_keepalive
> function.

> With the recent problem encountered by Yangtse, I propose in the patch to
> use a --keep-alive option rather than a --no-keep-alive option (default :
> keep-alive disabled).

Thanks, but I don't think the question of keep-alive or no-keep-alive is
strictly related to the addition of these --tcp-keep* options so we are better
off discussing and dealing with them separately. Here follows by comments on
the new options.

I'd prefer if failing to set these options still return zero as I don't
consider problems with these options fatal. I will also appreciate getting a
man page update for the three new options. Do you really think all three
options are necessary? Have you actually found a use-case where you need to
tweak all of them?

Finally, I'm thinking about the problem with non-TCP connections and that this
callback will be called for them as well. Can't we assume that these TCP_KEEP*
options all work or none works? I mean, there's no need to output all three
warnings for TFTP transfers... Or why not do this: we first do a getsockopt()
on the socket to see if SO_KEEPALIVE is enabled - and only then try to set
these options? Then we'll only see a single warning on TFTP transfers... (and
yes, we should work on getting that warning removed as well but I haven't yet
come to a conclusion on what the nicest way to do that is)

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-01-08