cURL / Mailing Lists / curl-library / Single Mail


Re: FTP keep alive connection

From: Loiseleur Michel <>
Date: Thu, 08 Nov 2007 21:30:41 +0100

Dan Fandrich a écrit :
> On Thu, Nov 08, 2007 at 12:20:40PM +0100, Michel Loiseleur wrote:
>> Here's some news. As stated with some of you on this list, the "NOOP"
>> approach is really dangerous and cannot be applied in all cases, with all
>> servers.
>> To the contrary, the SO_KEEPALIVE approach is working well. The patch is
>> nonintrusive and do not force us to add some more flags or more options on
>> compile time.
>> It was validated on the whole set of my use cases. See the patch attached
>> for a sample code. It's maybe not the good place to set it, since I cannot
>> put the error message on the common log. But I do not know if it's better to
>> get the logger in the function or to set this socket option elsewhere, where
>> the logger is. So I'll leave it to one of the maintener.
> You should be able to accomplish the same thing without touching libcurl
> code at all using the CURLOPT_SOCKOPTFUNCTION callback. That makes it
> 100% nonintrusive.
   Since I use the curl binary client, and not the libcurl, I do not
really understand how I can get a feature and being 100% nonintrusive.

  Would you please explain your idea with more in detail ?


Received on 2007-11-08