Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find out the max bandwidth on the client side?

13 views
Skip to first unread message

Viv

unread,
Aug 16, 2010, 11:35:35 AM8/16/10
to
Hi all,


I have to write a C/C++ client application on windows that runs in the
background and keeps sending info to the server. Depending on the
speed of the interface, I have to give the user the possibility to
select what percentage of the bandwitdth the application shall use.
Lets say, if the maximum transfer rate is 1000 kb/s and the user says
that 10% can be used by my application I want to do a 100 kb/s. I
could actually do (in this sample):
while (data left to send) {
send 100 kB of data
wait 1 second
}
which will do the 100kb/s, but my problem is: How could I determine
(in my client application) the maximum transfer rate (maximum
Bandwidth) in order to "translate" then later the percentages the user
wishes?


I found the sample here:
http://www.codeproject.com/KB/IP/Bandwidth_throttling.aspx
but this seems to be the code needed for the server side and I need
the code that would be on a client side (C/C++).

Thx in advance,
Viv

0 new messages