2

I have a asp.net web application that uses C#. It logs in on a remote machine and download files from the server. I wish to display bandwidth available during the connection or the speed of connection.

What could be the best possible way if I m not allowed to use any external library or APIs? How can I implemet it using Javascript?

Thanks in advance. :)

akhil
  • 1,202
  • 3
  • 21
  • 43

2 Answers2

2

Have a look at the following page:

Determining available bandwidth

It suggests there isnt really an easy way of doing it.

This one has some ideas of how to do it though:

Detecting network connection speed and bandwidth usage in C#

Hope they help.

Community
  • 1
  • 1
Gaz Winter
  • 2,924
  • 2
  • 25
  • 47
  • Oh... That was really helpful.. but U know THIS IS ASP.NET. I havn't heard anything impossible here yet. There must be some way or the other for doing this the ASP.NET way. – akhil Jul 02 '12 at 12:49
1

This article does a good job of explaining how Google Analytics calculates speed.

As suggested by the article one of the easiest to implement but least accurate ways could be to implement / build a solution that matches the users IP address against the ISP that IP address belongs to, then "assume" the connection speed. I personally feel this would be way too inaccurate but it might be enough for your needs, especially if you are working on an application running over a closed WAN.

Kane
  • 16,471
  • 11
  • 61
  • 86