ios - When does an NSURLRequest time out? -


the nsurlrequest class (ios docs, os x docs) in cocoa has timeoutinterval property. docs state

if during connection attempt request remains idle longer timeout interval, request considered have timed out.

what 'idle' mean, here? best can tell, means in practice if set 30 second timeoutinterval , call method sends nsurlrequest, if body of http response hasn't returned 30 seconds after sending request, request times out. what's going on?

a few things can think of might trigger idleness timer reset: receiving http headers, or receiving part of body. (if either) matters in reality?

no bytes received 30 seconds normal definition. should able write simple http server (there sample projects over) , run on private port, connect prove yourself.

to simulate timing out in server, add "40" or constant byte promising client, client wait forever 40 bytes bytes @ end aren't ever coming.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -