cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TCP_NODELAY

From: Seshubabu Pasam <pasam_at_seshubabu.com>
Date: Mon, 29 Mar 2004 00:28:27 -0800

I just used 2 hrs as an example. AFAIK, there usually is nothing in the
web server that drops the client connections, because of in-activity.
The reason I asked for this is, we are trying to use libCurl for
communication between a C client and a servlet container. We maintain a
pool of curl handles open and we do not want them to timeout because of
in-activity. Also adding this option should not hurt any application
that uses curl, in any way.

Regards
-Seshubabu Pasam

Daniel Stenberg wrote:
> On Thu, 25 Mar 2004, Seshubabu Pasam wrote:
>
>
>>Here is the patch to set the KEEPALIVE on the socket. This should avoid
>>sockets from timing out inside applications that hold curl handles for more
>>than 2 hrs.
>
>
> There's nothing in TCP that times out after 2 hours of silence the last time I
> checked. SO_KEEPALIVE mainly enables the connection to detect a dead
> connection that otherwise has no traffic.
>
> Further, I doubt there are many HTTP or FTP servers out there that keep a
> connection open for more than 2 hours of silence between requests.
>
Received on 2004-03-29