• 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
Re: Reuse and lifetime of NSURLSessions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reuse and lifetime of NSURLSessions


  • Subject: Re: Reuse and lifetime of NSURLSessions
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 27 Jan 2015 20:55:50 -0800


On Jan 27, 2015, at 5:50 PM, Greg Robbins <email@hidden> wrote:

1. Should there be one session per host, or one session for all of an app’s fetches, or should each session be used for some set of hosts? 

Well, the old approach of using NSURLConnection is equivalent to having one global NSURLSession for all URL requests in your app. So at one extreme, you can use a single session.

I think it comes down to whether some of your requests need different parameters like delegates or caching or something like that. (Or different threading!) If they do, having a separate session is a convenient way to do that. Otherwise, I'd stick with one session for efficiency.

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Reuse and lifetime of NSURLSessions (From: Greg Robbins <email@hidden>)

  • Prev by Date: Reuse and lifetime of NSURLSessions
  • Next by Date: Re: Reuse and lifetime of NSURLSessions
  • Previous by thread: Reuse and lifetime of NSURLSessions
  • Next by thread: Re: Reuse and lifetime of NSURLSessions
  • Index(es):
    • Date
    • Thread