Jump to content
  • Advertisement

Archived

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

hpolloni

bandwidth control

This topic is 5725 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

how can i specify how much bandwidth a program can use,im making an app that need to control the bandwidth it use. Sorry for my lame english

Share this post


Link to post
Share on other sites
Advertisement
a) I think you can throttle bandwidth using QoS (Quality of Service), but this has to be supported by the OS and the router, etc...

b) Another more portable way to do it is to just keep tally of how many bytes are sent (this is returned by send() and recv() ) and the amount of time it has been sending/recving (using any number of timer functions).. bytes/time (in seconds) = Bps ... if the Bps goes over a certain threshold either don''t send the data until it goes beneath the threshold or calculate how many bytes you can send (Target Bytes/Sec * Num Seconds - Bytes Sent = How many bytes you can send without going over target Bps) and just send that many bytes..

It''s certainly extra work either way...

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!