On 20 Jan 09, at 12:22, Mohan Parthasarathy wrote:
I want to be able to establish the TCP connection to a server and do multiple HTTP GETs with different URLs. I thought will achieve this by allocating a NSURLConnection and then initWithRequest:urlRequest with a different URL everytime as there is no other way to set the URL. It looks like that this is not working and the URL is not changing.
Initializing ObjC objects multiple times is always incorrect. Don't do it!
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.
While debugging, i found that sending a description message to NSURLConnection coredumps. Is that right or a bug in my program ?
This is probably a side-effect of multiple initialization. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
