Fastest way to send several HTTP Post request for iOS? -


i need send around 20 http post requests in ios application. right using nsurlconnection , sending 20 requests 1 one, of course takes long time. each connection starts after previous, taken around 7 seconds complete requests. possible send these 20 requests simultaneously , receive json result faster?

you can use nsoperation , nsoperationqueue prepare of requests , push them onto queue @ same time. can set concurrent execution limit determine how many run @ same time. don't run 20 @ same time though may flood network , prevent of connections completing properly. try running 5 concurrently , see how goes.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -