Set the timeout val as mini as you can curl_easy_setopt( hnd, CURLOPT_TIMEOUT, 1L) Ĭurl_easy_setopt( hnd, CURLOPT_NOPROGRESS, 0) Ĭurl_easy_setopt( hnd, CURLOPT_XFERINFOFUNCTION, progress_cb) * HTTP/2 please */ curl_easy_setopt( hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0) * set the same URL */ curl_easy_setopt( hnd, CURLOPT_URL, " /* send it verbose for max debuggaility */ curl_easy_setopt( hnd, CURLOPT_VERBOSE, 1L) * write to this file */ curl_easy_setopt( hnd, CURLOPT_WRITEDATA, out) If I return > 0, the libcurl will reconnect the connect printf( "progress_callback exit\n") It is _not_ defined to zero in a recent libcurl header. #include #include #include /* somewhat unix-specific */ #include #include /* curl stuff */ #include #ifndef CURLPIPE_MULTIPLEX /* This little trick will just make sure that we don't enable pipelining for libcurls old enough to not have this symbol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |