• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSURLConnection/NSURLDownload max simultaneous connections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLConnection/NSURLDownload max simultaneous connections


  • Subject: NSURLConnection/NSURLDownload max simultaneous connections
  • From: Filipe Varela <email@hidden>
  • Date: Fri, 27 Jul 2007 11:25:09 +0100

Dear list

I'm developing an application that, under certain conditions, spawns quite a few NSURLDownload for several different files/urls at several different servers.

While checking what was happening under the hood, i discovered that i can never get more than 4 simultaneous connections. If i spawn 20, (NSLog shows they were inited and started) only 4 open immediately. After that, a new is started everytime an existing one is finished.

I have no queuing mechanism!

Does anyone have a clue as to how i can circumvent this limitation (if, indeed, it is a limitation)?

- sample flow
: instantiate 20 NSURLDownload (they're started with the init method so no further action is needed)
: for each, log instantiation result (nil? always false)
: check Activity Monitor for open files/pipes. Only 4 sockets at a time
: NSLog each downloadDidFinish and downloadDidReceiveResponse
: Everytime a downloadDidFinish occurs, a new downloadDidReceiveResponse also occurs until all are finished
: simple debug action taken:
: increment downloadCount variable at each downloadDidReceiveResponse
: decrement downloadCount variable at each downloadDidFinish/ FailWithError
: evey NSLog of downloadCount reads 4 until less than 4 downloads are left to complete


Cheers

Filipe Varela


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Is pointer syntax logical?
  • Next by Date: [update] NSURLConnection/NSURLDownload max simultaneous connections
  • Previous by thread: Re: NSTimers and sleeping mac's
  • Next by thread: [update] NSURLConnection/NSURLDownload max simultaneous connections
  • Index(es):
    • Date
    • Thread