Discussion:
How to find out the max bandwidth on the client side?
(too old to reply)
Viv
2010-08-16 15:35:35 UTC
Permalink
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
Marcin Załęczny
2010-08-23 08:24:15 UTC
Permalink
Hi

I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
getting to know this param is simple:
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and sends
it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).

--
Marcin Zaleczny
Post by Viv
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
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?
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
Viv
2010-08-23 11:12:53 UTC
Permalink
Hi,

Thx for the answer. Problem is, I don't want all my clients doing this
kind of test as it will overload the server. I hoped, that somehow,
the system has some internal measurements about this ... Something
like: the system always keeps info about how much was send/received in
how much time and when questioned about this would be able, from the
numbers it already got, to give an aproximate number about the speed
of the upload.

Thx,
Viv


On Mon, 23 Aug 2010 10:24:15 +0200, Marcin Za??czny
Post by Marcin Załęczny
Hi
I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and sends
it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).
Pavel A.
2010-08-23 11:56:33 UTC
Permalink
Post by Marcin Załęczny
Hi
I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and
sends it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).
This is similar to what the QWave does in Vista+.
http://msdn.microsoft.com/en-us/library/aa374110(v=VS.85).aspx

/pa
Post by Marcin Załęczny
--
Marcin Zaleczny
Post by Viv
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
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?
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
Viv
2010-08-27 10:22:54 UTC
Permalink
Hi Pavel,

I'm not sure what qWAVE is doing. Can I use it for my purposes? And if
I want to use it do I need to have Windows systems on both ends
(server and client)?

Thx,
Viv


On Mon, 23 Aug 2010 14:56:33 +0300, "Pavel A."
Post by Pavel A.
Post by Marcin Załęczny
Hi
I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and
sends it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).
This is similar to what the QWave does in Vista+.
http://msdn.microsoft.com/en-us/library/aa374110(v=VS.85).aspx
/pa
Post by Marcin Załęczny
--
Marcin Zaleczny
Post by Viv
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
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?
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
Pavel A.
2010-08-27 18:50:26 UTC
Permalink
Post by Viv
Hi Pavel,
I'm not sure what qWAVE is doing. Can I use it for my purposes?
Neither I am :( the QoS stuff is too complicated. Try it...
The relevant MSDN forum is msdn.en-us.networkqosqwave
Post by Viv
And if
I want to use it do I need to have Windows systems on both ends
(server and client)?
AFAIK it works with variety of systems on the remote end.

Regards,
-- pa
Post by Viv
Thx,
Viv
On Mon, 23 Aug 2010 14:56:33 +0300, "Pavel A."
Post by Pavel A.
Post by Marcin Załęczny
Hi
I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and
sends it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).
This is similar to what the QWave does in Vista+.
http://msdn.microsoft.com/en-us/library/aa374110(v=VS.85).aspx
/pa
Post by Marcin Załęczny
--
Marcin Zaleczny
Post by Viv
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
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?
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
Viv
2010-08-30 14:38:07 UTC
Permalink
Yes, I already posted my question on the MSDN forum, but without any
luck, at least, until now:
http://social.msdn.microsoft.com/Forums/en-US/networkqosqwave/thread/81163323-167f-4488-8e58-815a5b00e78d

Thx anyhow for your answer.
Viv

On Fri, 27 Aug 2010 21:50:26 +0300, "Pavel A."
Post by Pavel A.
Post by Viv
Hi Pavel,
I'm not sure what qWAVE is doing. Can I use it for my purposes?
Neither I am :( the QoS stuff is too complicated. Try it...
The relevant MSDN forum is msdn.en-us.networkqosqwave
Post by Viv
And if
I want to use it do I need to have Windows systems on both ends
(server and client)?
AFAIK it works with variety of systems on the remote end.
Regards,
-- pa
Post by Viv
Thx,
Viv
On Mon, 23 Aug 2010 14:56:33 +0300, "Pavel A."
Post by Pavel A.
Post by Marcin Załęczny
Hi
I don't know if Windows automatically detects max interface bandwidth and
than provides appropriate API for querying this value, but the idea of
1. In your app make a function that sends some large amount of data to a
nearest available serwer on which you can install your soft.
2. On server side write some script or app that receive this data and
sends it back to your app.
3. In your app do getting the time of data being sent and being received.
4. Repeat above process for ex. three times and count average times. Than
save results in your app's configuration data (you get: out max bandwidth
and in max bandwidth).
This is similar to what the QWave does in Vista+.
http://msdn.microsoft.com/en-us/library/aa374110(v=VS.85).aspx
/pa
Post by Marcin Załęczny
--
Marcin Zaleczny
Post by Viv
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
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?
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
Loading...