The NSURLRequest
class (iOS docs, OS X docs) in Cocoa has a timeoutInterval
property. The docs state
If during a connection attempt the request remains idle for longer than the timeout interval, the request is considered to have timed out.
What does 'idle' mean, here? As best as I can tell, what this means in practice is that if I set a 30 second timeoutInterval
and call a method that sends the NSURLRequest
, then if the body of the HTTP response hasn't returned 30 seconds after sending the request, the request times out. But is that really what's going on?
A few things I can think of that might trigger the idleness timer to reset: receiving the HTTP headers, or receiving part of the body. But which (if either) matters in reality?