cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: FTP keep alive connection

From: BLANC Gilles <gblanc_at_linagora.com>
Date: Mon, 10 Dec 2007 14:06:37 +0100

On Monday 10 December 2007 12:35:52 Daniel Stenberg wrote :
> On Thu, 6 Dec 2007, BLANC Gilles wrote:
> I think I would like it optional to switch it off with a command line flag,
> just for the rare circumstances when people don't want this to disturbe.
>
> --no-keep-alive perhaps?

ok !

> >> #4 - A minor nuisance is that setsockopt() on POSIX takes a socklen_t
> >> type in its last argument while for example winsock takes (and I believe
> >> some pre-POSIX unixes do too) an 'int', so using sizeof() like that will
> >> cause a warning on some compilers...
> >
> > Well in the rest of the code, it alters between sizeof (var) and sizeof
> > (int) ; once, there is a "sizeof (var) < 0", nasty hacks which is not so
> > stupid after all ^^. I don't have a window compiler near me (I'm an
> > healthy guy), what would you advise ?
>
> I think we could/should introduce a little #ifdef thing for windows to
> start with that typecasts the argument to 'int', but we can also just do
> that after we apply and commit your patch.

ok, I let you decide, so.

> > I wait for your precisions/decisions ("option or not, that is the
> > question"), and the I will post a new patch jus after, if you don't mind
> > :).
>
> Fair enough!

Here it is ! :)

So we have : one extra config option "--no-keep-alive" (with its help),
corresponding to the "nokeepalive" boolean flag (in struct Configurable),
commanding the deactivation of the default callback function setting (with
my_setopt). The "set_so_keepalive" function has also been reviewed to match
the standard of quality ;).

Thanks,

-- 
Gilles Blanc - gblanc_at_linagora.com
Ingénieur informatique embarquée
Groupe LINAGORA - http://www.linagora.com
Tél.: +33(0)1 58 18 68 28 - Fax : +33(0)1 58 18 68 29

Received on 2007-12-10