cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: TCP_NODELAY

From: Tor Arntsen <tor_at_spacetec.no>
Date: Mon, 29 Mar 2004 13:09:39 +0200

On Mar 29, 9:29, Seshubabu Pasam wrote:
>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.

I know this is a rather special example, but I used to work at a place
where I would go to the office, connect my laptop, set up a ppp tcp/ip
link through my GSM phone (from Italy to Norway), start doing some work,
then shut off the phone as soon as there was an idle moment -- without
stopping any ongoing tcp/ip transfer. The phone bills could go ballistic,
so this was a necessity. (Occasionally I would even suspend the laptop
and go back to my apartment, and the next day I would fire up the phone
and continue the transfer. The tcp/ip connection had stayed open the
whole night, without the physical link.)
I used SSH for most of my transfers, and it has a default keepalive
option. I had to turn off keepalive, otherwise the ssh client would
eventually get a write failure (because the physical link was down)
and terminate the connection. I definitely didn't want that!
What I'm trying to say is that using keepalive can sometimes work
against you when you want to keep a connection open for a long time.

-Tor
Received on 2004-03-29