Hi,
I try to create a way to use http request on my game,
I do it using java on android and obj-c on ios,
but I want to use c++ to create one single code for both plataforms.
I create a synchronous http request using this post
[[http://www.jesusbosch.com/2012/08/internet-communications-with-cocos2d-x.html]]
But now I want to create a asynchronous http request, because a month ago I got one of my games repproved by samsungapps because I use a synchronous http request(the server take long time response and the system show an ANR[app not respond] error)
The libcurl have the multi interface, but I look in the official website of libcurl and can’t create a example using it.
Anyone could help create a asynchronous http request, using libcurl or using another approach?
Hi,
I try to create a way to use http request on my game,
I do it using java on android and obj-c on ios,
but I want to use c++ to create one single code for both plataforms.
I create a synchronous http request using this post
[[http://www.jesusbosch.com/2012/08/internet-communications-with-cocos2d-x.html]]
>
But now I want to create a asynchronous http request, because a month ago I got one of my games repproved by samsungapps because I use a synchronous http request(the server take long time response and the system show an ANR[app not respond] error)
>
The libcurl have the multi interface, but I look in the official website of libcurl and can’t create a example using it.
Anyone could help create a asynchronous http request, using libcurl or using another approach?
The example of libcurl using multi works perfectly, I’ll make more tests to see if works the way I need.
Thanks ‘Seppe R’.
>
About the CCHttpClient, how I can use it? It’s good to have more options to use.
This is not a solution for the problem rather a query. I have a module in C++ and I have created 10 threads to send different curl requests for a telecom product. Now to distribute the load and handle asynchronous requests concurrently I want to use curl_multi. But I am not sure how to fetch requests and send them to curl asynchronously. Is there anyway it can be done?