Hello I want to calculate the throughput through C# using HttpWebRequest
.
I thought of requesting a big file (500KB) while running a System.Diagnostics.Stopwatch
.
Then I could calculate the KB/s rate. I have 2 problems at this point:
1. How accurate is this going to be? Can I rely on it or should I just use another method?
2. How can I host the file on a URL I can hard-code without worrying about server-side problems? Could I somehow use a file with such a size already present preferably on googles or microsofts page?
Thanks in advance,
Alex
It's really not something you should rely on:
You'd be best asking your user to pick their connection type from a list (e.g. "Modem - 56kbps", "DSL - < 2Mbps"), and use that to estimate how much bandwidth you'll have available.