The libcurl "multi" interface can run HTTP requests in the background (it uses a second thread, but the effect is the same). First create a multiroom with curl_multi_init . Then set up a simple handle (create it with curl_easy_init and set the URL and other parameters with curl_easy_setopt ) and call curl_multi_add_handle . curl_multi_perform will start the transfer (transfer) and return immediately, and you can call curl_multi_info_read to get the status of your simple pens. Remember to call curl_multi_cleanup when done.
http://curl.haxx.se/libcurl/c/libcurl-multi.html
source share