Find download/upload Internet speed programmatically.

Discussion in 'Mac Programming' started by mycompuser, Aug 8, 2012.

  1. mycompuser, Aug 8, 2012
    Last edited: Aug 8, 2012

    macrumors member

    May 8, 2012
    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

    curl -o /dev/null
    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?
  2. macrumors 68000

    Mar 29, 2009

Share This Page