...

View Full Version : how to measure download speed? (programming, C#)



halimunan
06-15-2007, 02:45 AM
Hello all,

I have a question, how do i measure the download/upload speed... as if download rate, upload rate or kbps transfer rate.
i want to do my own windows application using C# to measure the download speed.

the idea is this.
1. i will put a file at a serverA.
2. i download the file
3. i measure the speed of the download(how long it would take me to complete the download)

the question:
1. how do i calculate the transfer time? the speed..?

ghell
06-18-2007, 07:59 PM
are you doing the file transfer completely in C# or are you trying to monitor a network interface?

If you are doing it completely in C#, either stick an event that gets the download completion time or just use synchronous transfers and do something like this

-get the time
-download the file
-get the time again
-calculate the size of the file dividied by the difference between times to get the speed

it career
06-20-2007, 07:29 AM
I think , I show simmilar example in C++ at sourceforge.net.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum