• 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: Roland King <email@hidden>
  • Date: Wed, 21 Jan 2009 09:19:09 +0800



Is there a way to not to allocate the connection everytime i need to send
a new request ?


Yes. I'm pretty sure that the URL loading framework will use HTTP keepalives automatically when appropriate.


I am not sure i undrstood this. If i allocate a NSURL connection
everytime
i need to fetch from a URL, wouldn't it set up a TCP connection everytime
and then download the data. If i can avoid that, wouldn't it be nice ?



Again, I'm pretty sure that the Cocoa URL loading functions will do this
for you as appropriate. Trying to implement it yourself is unnecessary, and
trying to go about it this particular way is futile as well as incorrect.


I don't want to do this myself. But i don't see anything in NSURLConnection
that would do this. If so, please point to me.



The class you're using represents a URL Connection, not an HTTP Server connection, so it's used at the URL level, you can't influence the server connection piece of it. It's possible that the underlying library uses a keepalive HTTP call and holds the connection to the server and, if you use another URL on the same server it reuses it, but sort of doubt it. There is no cocoa class I know of which represents a server connection which you can set up and say 'use this server connection for this URL' nor is there anything in NSURLConnection which says 'use keepalive, I'm probably going to send more requests'. _______________________________________________


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


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>)

  • Prev by Date: Re: Draw NSView over QTMovieView
  • Next by Date: Re: Accessing interface elements (iPhone vs Mac)
  • Previous by thread: Re: NSURLConnection changing the URL
  • Next by thread: Re: NSURLConnection changing the URL
  • Index(es):
    • Date
    • Thread