Ping and Bandwidth
<p>We are developing an application that uses ASIHTTP libraries. Once the application loaded, we have an interface to choose logging in like a registered user and as visitor. 
Previously, we catch from our server if there are new things to download or not showing an activity indicator until it's done with the operation, and then we load the contents correctly to show in the interface and show it.
One big problem we have is that, in very poor quality and slow connections (with 3G, Wifi), downloading and connecting processes never end, so we have the activity indicator running and running... 5, 10, 15,... minutes for only a few KB to get (10Kb or less).</p>

<p>We have thought about some possibilities:</p>

<p>1 - The most trivial: Set a time out to all asynchornous requests and when any of them reach it, abort all requests and then load the interfaz post-log-in and the app runs normally. </p>

<p>The problem is: We can loose data when ping is a little high in one moment and the bandwidth is effectivly usable. The time we spend in these comprobations is too elevated so we threw this possibility</p>

<p>2 - Know ping, bandwidth (Connection quality in speed and ping terms), beforehand when application is launching so when user logs in, we can determine if it is viable or not to download contents and so on</p>

<p>I've search and I found sample codes that finds the reachability of a server.</p>

<p>Any idea how can we do this? </p>

<p>Thanks.</p>
