I’m looking for a class or a library or anything that will allow me to get the current download speed, I’ve tried a lot of code from the net including FreeMeter but can’t get it to work.
Can some provide any sort of code just to give this simple functionality.
Thanks a lot
I’m guessing you want kb/sec. That is determined by taking
kbreceivedand dividing it by the current seconds minus the starting seconds. I’m not sure how to do the DateTime for this in C#, but in VC++ it would be like so:You then divide:
To get
kbreceived, you need to take thecurrentBytesread, add in bytes already read, then divide by 1024.So,
Minus some implementation specific functions, the basic concept is the same regardless of language.