I want to timeout the connection or make the connection invalidate or display an alert saying “connection time out”, if the response is not received (or connection delegate methods not called) after 5 secs or 10 secs (a certain time period). Does anybody has a solution for this?
Share
make sure your
NSURLConnection'sdelegate is set and responds to theconnection:didFailWithError:method. A connection always calls either this method orconnectionDidFinishLoading:upon connection completion.your timeout is received in
connection:didFailWithError:so here you can display that connection has timed out