Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CoriolisForce

Monitoring available bandwidth

This topic is 5528 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know a way of monitoring the bandwidth available to an application so that it can react to changes in it, i.e. when the user downloads a file in the background, your app will have it''s bandwidth squeezed.

Share this post


Link to post
Share on other sites
Advertisement
If you''re working with Win32, you can use WMI. It''s COM accessible, so you can just query the bandwidth. I would probably use

Win32_PerfRawData_Tcpip_Networkinterface
- BytesSentPerSec
- BytesReceivedPerSec

Since it''s a raw counter, you can query it at 30 second or 60 second intervals and calculate the average bandwidth used / second over the last interval and see how close that is to 10 or 100 Mbs depending on your interface speed.

You''ll have to look up the formula, it''s on the WMI page.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_start_page.asp

Interim

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!