Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mycompuser

macrumors member
Original poster
May 8, 2012
37
0
Hi All,

I have an cocoa application developed in Lion using XCode 4.3.2 and used to connect to an wifi hotspot. I need to determine quality of the connected network in my app.

I would like to know the way to determine programmatically the internet quality namely internet download speed and latency. (upload speed and packet loss will also be of great help too).

I have a constraint that the api call must not be synchronous (blocking). Is there an mechanism by which I can initiate an upload/download of an file and periodically sample the current speed of upload/download and also latency so that I can monitor for the same and update in my UI.

I tried googling for the same and found an curl command which contains the few of the required parameters

Code:
curl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test.zip

But the problem with this is that it continues till the entire file is downloaded. Is there an alternative call which is async and I can abort as per my need?

Can I use http to achieve the same? If so could you please direct me on those lines?
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.