Monitoring available bandwidth

Started by
0 comments, last by CoriolisForce 20 years, 11 months ago
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.
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

This topic is closed to new replies.

Advertisement