How many simultaneous (concurrent) network connections does iphone support?

cocoa-touch, iphone, network-programming, objective-c

Solution

The iPhone doesn't start queuing `NSURConnection`s. That's totally your responsibility. The iPhone will start all your asynchronous `NSURLConnection`s in parallel. The only thing that will stop it is your memory :) I recently implemented a connection pool (my solution was based on `NSOperationQueue`) just because of that. Now I can control parallel connections and my app doesn't crash when loading hundreds of avatar images.

About your second question. I actually don't know about a way to get the list of current threads. I had a look at `NSThread` API but no sign of an API for that..

Problem

I can't seem to find this anywhere, but I'm sure there must be an answer... How many simultaneous HTTP connections can an iphone app service? In other words, if I build and run a bunch of NSURLConnections asynchronously, how many can be in flight before it starts queuing them? Also, is there a method to check how many threads are available and/or in use programmatically? I'm trying to write an intelligent pre-fetching engine, and these limits (if any) would be useful information.

Original source

Related problems