Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
i have check IPv4InterfaceStatistics Class of C# and its seems it display all Information of your Network, from bandwidth download / upload, Packet Sent / Rcvd, and Speed of your LAN,

Upon checking the properties, i have found out that all of the properties are GET only.

Is there a way for us to set / limit the bandwidth of download / upload?

thanks in advance.
Thanks
Posted

1 solution

For all applications or just your own that is doing some transferring of data??

For all applications, no, there is no setting to limit this. Theere are two ways of doing this. The first would be to put a proxy/firewall server between the client machine and its destination server, which has the capability of throttling bandwidth.

The second would be to write a driver that is inserted into the network stack that does the same job. This cannot be easily written in C# and, frankly, you don't want the full weight of the .NET Framework added to the kernel anyway. You would normally use C/C++ for this job.

For only your application, you would need to write your sending code to pace itself, only sending data in small bursts once in a while.

Frankly, now-a-days, I don't see the point in limiting bandwidth.
 
Share this answer
 
Comments
samadblaj 25-Aug-12 10:53am    
Effect on the speed of all applications
Dave Kreskowiak 25-Aug-12 11:48am    
I already told you what needs to be done.
samadblaj 25-Aug-12 12:39pm    
please more...
Dave Kreskowiak 25-Aug-12 13:21pm    
There is nothing more. I already told you what to do. If you can't write a driver, which is a VERY advanced thing to take on, then you have no choice but to buy and off-the-shelf proxy server product. You'll, of course, have to learn to administer that too.
samadblaj 25-Aug-12 13:56pm    
The second method is better?
I'm a newbie.
Where can I get help from.
Thanks for the reply

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