curl-library
Re: FTP keep alive connection
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 8 Nov 2007 00:12:59 +0100 (CET)
Date: Thu, 8 Nov 2007 00:12:59 +0100 (CET)
On Wed, 7 Nov 2007, Jamie Lokier wrote:
> SO_KEEPALIVE defaults to every 2 hours, which is a bit long to keep
> open a NAT connection in my experience.
>
> You can reduce the time on some OSes using some more socket options:
>
> TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL.
>
> This is much better then sending data, for keeping a NAT open.
Yes, given all the facts in the case I really think SO_KEEPALIVE on the
control connection is the only near-sensible thing to do to hold
NATs/firewalls "happy". Then of course adjusting the time to a user-provided
timeout value would need to be done.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-11-08