curl-library
RE: CURL_EASY_PERFORM non-blocking vs blocking
Date: Thu, 19 Mar 2015 17:05:38 +0000
>I'm currently using CURL_EASY_PERFORM to send data to a remote URL. I notice that in my current configuration it appears to be behaving synchronously (i.e. waiting until completion of function). Since at times I may have several of these calls executing within a short duration I'd like to make this call asynch. Is this possible and if so can someone please advise on how to do it?
You should use the MULTI API - read more about in http://curl.haxx.se/libcurl/c/libcurl-multi.html
But note - you'll responsible to supply libcurl "event driven" framework:
Call it when socket event happen - see CURLMOPT_SOCKETFUNCTION.
Call it when timeout is reached - see CURLMOPT_TIMERFUNCTION.
HTH
Yehezkel
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-03-19