• 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: NSURLConnection changing the URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection changing the URL


  • Subject: Re: NSURLConnection changing the URL
  • From: Michael Vannorsdel <email@hidden>
  • Date: Tue, 20 Jan 2009 22:17:19 -0700

I've looked into this quite some time ago and have seen NSURLConnection keep FTP and HTTP connections open even after the originating NSURLConnection had been deallocated. The same connection was reused for subsequent NSURLConnections to the same destination. I never did see these close though so I don't know their lifetimes. All I know is they lasted at least 5 mins.

This came about because I saw the connections still open after the request had ended and was debugging to see why they were stuck open. Never did figure out how to force them to close.



On Jan 20, 2009, at 9:45 PM, Michael Ash wrote:

*Do* *not* *make* *assumptions*.

You're making a huge assumption here:

A) NSURLConnections must be reused in order to have persistent HTTP connections.

And then we have this simple fact:

B) There is no way to reuse an NSURLConnection.

Putting these two together, we have a conclusion:

C) NSURLConnection does not allow persistent HTTP connections.

Since conclusion C is pretty much absurd, it would follow that perhaps
assumption A is wrong.

But don't assume. *Test*. Write some code and then use a network
sniffer to see if, in fact, persistent connections are being used.

If you don't know how to use a sniffer, this is your golden
opportunity to learn. Doing network programming without a sniffer is
like doing carpentry without any eyes. A particularly talented person
might get astonishingly far without them, but he's still going to
suffer from a severe handicap relative to a person who can actually
see.

Above all, please don't come barging onto the mailing list asking
about a half-baked solution for a problem that you haven't even
verified the existence of.

_______________________________________________

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


  • Follow-Ups:
    • Re: NSURLConnection changing the URL
      • From: Mohan Parthasarathy <email@hidden>
References: 
 >NSURLConnection changing the URL (From: "Mohan Parthasarathy" <email@hidden>)
 >Re: NSURLConnection changing the URL (From: Andrew Farmer <email@hidden>)
 >Re: NSURLConnection changing the URL (From: "Mohan Parthasarathy" <email@hidden>)
 >Re: NSURLConnection changing the URL (From: Andrew Farmer <email@hidden>)
 >Re: NSURLConnection changing the URL (From: "Mohan Parthasarathy" <email@hidden>)
 >Re: NSURLConnection changing the URL (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: NSURLConnection changing the URL
  • Next by Date: Re: NSXMLNode and NSXMLElement
  • Previous by thread: Re: NSURLConnection changing the URL
  • Next by thread: Re: NSURLConnection changing the URL
  • Index(es):
    • Date
    • Thread