Determine Bandwidth and Latency of (User) Internet Connection lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- tudi_x · 2017-09-18 08:21 hi All, cross platform how i could determine the bandwidth and latency of the internet connection the user is using? for latency i want to avoid PING as i understood even in TProcess would need special rights on Unix. thank you ---------------------------------------------------------------------- Thaddy · 2017-09-18 08:57 Bandwidth is a bit difficult/impossible w/o moving files hence and forth (that's how speedtest.net and the likes do it, using a browser cache/temp/flash datastore), but latency is easy to measure with any protocol: just time the interval between request and response. Preferably a couple of times. Note that if you want to measure bandwidth yourself, be careful not to measure your own bandwidth: E,g, I have 100/30 but at work I have 500/500. I'll end up measuring myself. ---------------------------------------------------------------------- benohb · 2017-09-18 09:22 Users On LAN ?? or Users in same PC ---------------------------------------------------------------------- tudi_x · 2017-09-18 09:35 users on internet using my app. ---------------------------------------------------------------------- benohb · 2017-09-18 14:59 Quoteusers on internet using my app. Users who using your app in their device ???? please explain ---------------------------------------------------------------------- tudi_x · 2017-09-18 15:33 the application is installed in a desktop computer and connects to a server in internet to download some files. i need to indicate to the user of the application if their internet connection works fine, basically: a. has internet b. bandwidth (poor, good, excellent) c. latency (poor, good, excellent) for a. i will make a GET to a server to receive some XML if a. then: for c. i am calculating how much time it took to get a. for b. i am trying to find a web service that sends a big XML so can compute some kind of bandwidth. i do not want to download a file for this due to different policies on user computers although it looks contradictory with the application scope ---------------------------------------------------------------------- Noodly · 2017-09-18 18:32 Quote from: tudi_x on September 18, 2017, 05:33:41 pmthe application is installed in a desktop computer and connects to a server in internet to download some files. i need to indicate to the user of the application if their internet connection works fine, basically: a. has internet b. bandwidth (poor, good, excellent) c. latency (poor, good, excellent) for a. i will make a GET to a server to receive some XML if a. then: for c. i am calculating how much time it took to get a. for b. i am trying to find a web service that sends a big XML so can compute some kind of bandwidth. i do not want to download a file for this due to different policies on user computers although it looks contradictory with the application scope If your app itself has sufficient rights when installed, you could try and incorporate the Synapse library and use it's ping functionality for a) and c). For b), relying on a third party server could lead to incorrect measurements in future if they introduce throttling when busy or add/remove compression. Of course all this won't matter so much if your thresholds for poor, good, excellent are spread widely in the first place. ---------------------------------------------------------------------- Trenatos · 2017-09-18 18:43 Bandwidth would be compared between a preset and current, as in "You've used 500mb out of 1gb available" type of thing. Latency is easy, just ping the server you're downloading from and record the time / 2, or wrap the system ping/trace info and use that.