CCHttpClient blocks on multiple requests?


#1

I’m using CCHttpClient to communicate with my server. It works fine as long as I only have a single request open. It seems that if a request takes a long time to complete, other requests cannot be sent until the first request completes. It seems to queue them up and release them one by one. This is running on iOS simulator. I’ll try on device shortly. Is this just a simulator issue?


#2

Same issue on device. Seems it doesn’t handle multiple requests correctly. I’ll have to investigate. Suppose I’ll submit a patch if I fix it… Simultaneous requests are kinda important…


#3

Ryan Wallace wrote:

I’m using CCHttpClient to communicate with my server. It works fine as long as I only have a single request open. It seems that if a request takes a long time to complete, other requests cannot be sent until the first request completes. It seems to queue them up and release them one by one. This is running on iOS simulator. I’ll try on device shortly. Is this just a simulator issue?

You are right , it uses a request queue .


#4

C Zhang wrote:

You are right , it uses a request queue .

Ya I see that in the code now. Is there any reason it wouldn’t use Curl’s multi interface to handle simultaneous requests in the single networking thread? My plan is to implement that going forward, unless there’s some reason why that would be a bad idea?


#5

I met the same problem. How to resolve the block request sequence when the above request not finished?