cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Re: How to avoid multiple CWD for each file download

From: Anders Havn <anders.havn_at_gmail.com>
Date: Fri, 21 Jun 2013 12:31:23 +0200

>
> > Can any of the commands CURLFTPMETHOD_NOCWD and CURLFTPMETHOD_SINGLECWD
> > cause the code to not work on some ftp servers?
>
> Yes.
>

So to be sure that it works on all ftp servers I should properly stick to
CURLFTPMETHOD_MULTICWD?

If you close the handle then you don't reuse it! Don't call
> curl_easy_cleanup() + curl_easy_init() between the transfers but instead
> just
> keep using the same handle. You'll see a significant performance boost.
>
> > curl_global_cleanup();
>
> You should only call the curl_global_* functions once during your program's
> entire life-time.
>
> --
>
> / daniel.haxx.se

What about the curl handle, can I keep working on the same instance the
programs life-time and therefore only curl_easy_init() once? Or can the
handle somehow get invalid so the call to curl_easy_perform() fails?

/Anders

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-21