views:

176

answers:

2

Hi! For my application, I want to show the user about the network bandwidth. So, that getting delay for downloading will be known by the user.. Is it possible to show them??

+1  A: 

Try this one: How to calculate network bandwidth speed in c#.

Simon Linder
while this is correct, that will show entire network adapter bandwidth, and not for an specific download
Rubens Farias
A: 

If it is that you're downloading via a stream then what you could do is to make a kind of "meter" which inherits from stream and exposes a property that is a summation of the bytes read or written to it's underlying stream object. Have the meter encapsulate the stream object that you're using to download and then read from the meter object. then ever so often you can check check the number of bytes read over time to calculate the consumed bandwidth speed.

kurtnelle