Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello to the community of CodeProject!
Right now, I am creating a program to calculate download time when it is given the file size and transfer rate.

However, I want the user to get his current download transfer rate and put it automatically into a 'Transfer Rate' textbox.
So how do I get current internet connection download transfer rate?
If possible I want it in KB/s.

I am beginner in this area.
Sorry for any grammar mistakes.
Thank you.

What I have tried:

I am still beginner in anything that related to internet connectivity but I want to explore this area and learn it.
I heard somewhere around the forum that internet connectivity in vb.net are related to Socket or whatsoever that I don't know.

If possible, I want the simplest way to find current internet data transfer rate!
Posted
Updated 26-Mar-16 8:43am
Comments
Sinisa Hajnal 25-Mar-16 3:47am    
Try to find some code, read some tutorials, learn things about reading download speed and then come back with concrete question about your code. This is not a good question for Q&A, this is request to do some work for you.
YusairiYap 25-Mar-16 17:52pm    
Owh thanks for reply!
I will learn about that!

1 solution

The high-level classes of the .NET framework for making web-requests hide that information from you (because for most applications it's irrelevant). You would have to use lower level classes like Socket Class (System.Net.Sockets)[^] instead in order to be able to calculate the transfer rate while the transfer is in progress. But socket-programming isn't a good starting topic for beginners..
If you want to give it a try anyway, here's further reading: Socket Code Examples[^]

The solution presented in this article might be interesting: Monitoring network speed[^]
Though it has the disadvantage that it will report the transfer rate of the "whole" network connection, so if there's another application downloading something it will be included in the reported transfer rate.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900