Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to measure download speed? (programming, C#)

    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..?

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    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

  • #3
    Banned
    Join Date
    Jun 2007
    Location
    Web Designer
    Posts
    321
    Thanks
    0
    Thanked 6 Times in 6 Posts
    I think , I show simmilar example in C++ at sourceforge.net.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •