Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get latency / ping time? #87

Open
NirmitDagly opened this issue Aug 5, 2022 · 1 comment
Open

How to get latency / ping time? #87

NirmitDagly opened this issue Aug 5, 2022 · 1 comment

Comments

@NirmitDagly
Copy link

NirmitDagly commented Aug 5, 2022

Kudos to the development team for this excellent work. It is really helpful and easy to implement.

I have gone through the code and can measure the download and upload speed accurately within the application. Now, beforehand I start the speed test, I would like to check the latency time as well.

So is that possible in any way with the current version of the library?

Regards,
Nirmit

@stephen-soltesz
Copy link
Contributor

Hello, @NirmitDagly I am not an ios developer, so I can't speak to all functionality available from this client. I can speak about the information provided by the NDT server during a test.

For both upload and download tests, the server sends periodic connection measurements that include (among other information) a TCPInfo structure, example here:

"TCPInfo": {
"BusyTime": 1234,
"BytesAcked": 12345,
"BytesReceived": 12346,
"BytesSent": 12347,
"BytesRetrans": 12348,
"ElapsedTime": 12349,
"MinRTT": 12340,
"RTT": 123411,
"RTTVar": 123412,
"RWndLimited": 123413,
"SndBufLimited": 123414
}

The MinRTT value will represent the best case latency between the client and server during the life of the connection. The RTT value will change over the life of the connection and reflect the latency due to other load on the network (caused by other traffic or the speed test itself).

Most client implementations provide a way to receive these measurement messages. If this ios client does not yet, that would be a welcome feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants