• 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: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Thu, 29 Jan 2015 09:45:33 +0000

On 28 Jan 2015, at 18:10, Greg Robbins <email@hidden> wrote:

> We've seen that server connections won't be kept alive across sessions (unlike with NSURLConnection.)

I wouldn't think of this being "unlike" NSURLConnection because, in my mind, all NSURLConnections in a process exist within some default session, and thus they all share the HTTP 1.1 persistent connections of that session [1].

> What else is more efficient when reusing a session?

The one other thing I know of for sure is TLS session cache entries.

Still, I would've thought that HTTP 1.1 persistent connections is sufficient to meet the definition of "wasteful", given that they are the heaviest weight objects that NSURLSession manages.

Oh, and btw, ...

On 28 Jan 2015, at 09:18, Quinn The Eskimo! <email@hidden> wrote:

> Off the top of my head I can see three really good reasons for using multiple sessions:

There's a fourth case that I forgot to mention:

o private browsing

And, of course, "fear and surprise", "ruthless efficiency", "an almost fanatical devotion to the Pope", and so on.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

[1] This wasn't how NSURLConnection was implemented originally, but it's definitely moving in that direction as we refactor the relationship between the new NSURLSession API and the older, now considered "for compatibility only", NSURLConnection API.


 _______________________________________________
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>)
 >Re: Reuse and lifetime of NSURLSessions (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: Reuse and lifetime of NSURLSessions (From: Greg Robbins <email@hidden>)

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