Re: NSURLConnection timeout -- what happens?
Re: NSURLConnection timeout -- what happens?
- Subject: Re: NSURLConnection timeout -- what happens?
- From: Jens Alfke <email@hidden>
- Date: Thu, 15 Oct 2009 12:59:47 -0700
On Oct 15, 2009, at 11:44 AM, Stuart Malin wrote:
I have looked through the NSURLConnection class reference, the
NSURLRequest class reference, the URL Loading System guide, queried
Google, searched mailing list archives, and even looked through
NSURLConnection.h, but can not find documentation about what happens
when an NSURLConnection times out. I presume that -- for the
asynchronous case -- the invoker's -connection:didFailWithError:
selector will be messaged. Is this so? Where is that defined?
I think so, but I don't remember for sure. Why not try it? Set a
timeout of 0.1 sec and send a request to a slow server.
But I haven't been able to find any documentation of what the
possible errors are, and what the data would be for those reported
failures.
NSURLError.h. But in practice you can sometimes get errors from other
domains too, especially if SSL is involved.
The URL Loading System guide has an example that uses the key
"NSErrorFailingURLStringKey" to access a value from the error
object's userInfo dictionary. Where might other such keys be defined?
Tip: To see where a symbol is defined, hold down Command and double-
click it. If you'd done that with that key, it would have taken you to
NSURLError.h and answered part of your question.
—Jens_______________________________________________
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