curl-library
RE: libcurl loop
Date: Wed, 22 Sep 2010 08:00:52 +0200
> I've pasted the relevant code below, any help would be greatly
appreciated. Thanks!
> -Tyler
Add curl_easy_setopt (handle, CURLOPT_VERBOSE, 1L) to see more of what
libcurl is doing.
And also move curl_global_init out of the loop. Perhaps not harmful, it is
only needed once per
application. Don't forget to do curl_global_cleanup for each
curl_global_init you do, which should only
be once as mentioned.
Without knowing the details of what some of the functions are doing with the
CURL handle, I would suggest
re-using the same handle for all network interaction. Just update the
options for URL, username, password or whatever that is needed an make the
curl_easy_perform calls with it. No need to do
curl_easy_init/curl_easy_cleanup each time.
Regards,
Mehmet.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-22