#include <curl/curl.h> CURLcode curl_easy_perform(CURL * handle );
|handle||Handle to a curl session.|
If the operation was successful,
CURLE_OK is returned. If the
CURLOPT_ERRORBUFFER was set with
curl_easy_setopt, there will be a
readable error message in the error buffer when nonzero is returned.
This function is called after the init and all the
curl_easy_setopt calls are made, and will perform the transfer as described in the options. It must be called with the same handle as input as the
curl_easy_init call returned.
Any amount of calls to
curl_easy_perform while using the same handle can be made. If intending to transfer more than one file, it is encouraged to do so.
libcurl will then attempt to reuse the same connection for the following transfers, making the operations faster, less CPU intensive and using less network resources.
curl_easy_setopt between the invokes to set options for the following
Do not call this function simultaneously from two places using the same handle. Allow the function to return first before invoking it another time. For parallel transfers, use several curl handles.
curl_easy_performallocates memory from the user stack during name resolution. Refer to
SOGetAddrInfofor the amount.
2014/03/19 Note about stack consumption.
2013/05/08 Automated cleanup pass.
2012/05/04 Initial version.