Thread: How to throttle Internet Bandwidth

  1. #1
    Registered User symbiote3's Avatar
    Join Date
    Jul 2007
    Posts
    5

    Question How to throttle Internet Bandwidth?

    hi everyone,

    i want to make an application that can throttle the internet/network bandwidth of other applications, in c++ preferably. i have the idea pretty much worked out. i could really use one. i know they exist but i would like to learn a little as well.

    i know some c . i think i understand c++ well enough (functions, while/for loops, classes, inheritance, pointers, arrays, vectors etc). been studying those things for about a year and a half. i know some basic things of the windows API(windows, child, windows procedure, menu's, semaphores, timers) but nothing big.

    i've been reading/searching around about winsock(out of a guess) to find out how bandwidth throttles are made but i havent found anything useful so far. can someone tell me where a good/the best place is to start out?

    sym
    Last edited by symbiote3; 07-01-2007 at 07:32 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I would imagine it would be something along the lines of the way firewalls intercept all network connections to provide services like packet filtering.
    To which you would record the amount of traffic per unit time, and moderate the onward transmission of packets to achieve the rates you want.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User symbiote3's Avatar
    Join Date
    Jul 2007
    Posts
    5
    can i find that kind of information in a winsock api reference?

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I've written something like this before,

    Now what I did:
    * Injected a DLL into the process I wanted to control bandwidth over
    * Hooked winsock send() and recv()
    * Timed how many times send() and recv() were being called with how much data to work out kb/s
    * Slowed the rate they could be called (relating approx to kb/s)

  6. #6
    Registered User symbiote3's Avatar
    Join Date
    Jul 2007
    Posts
    5
    Salem:
    for some reason i didnt think of looking at open source. thanks for the suggestion

    zacs7:
    thanks . thats really useful info. for now, im going to look up how to do those things.


    sym

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2 internet connections
    By Erakis in forum Windows Programming
    Replies: 0
    Last Post: 07-01-2009, 07:14 AM
  2. Internet Problems
    By SirCrono6 in forum Tech Board
    Replies: 3
    Last Post: 04-26-2004, 09:47 PM
  3. XP Internet problems
    By Hunter2 in forum Tech Board
    Replies: 9
    Last Post: 09-18-2003, 08:56 PM
  4. Internet Publishing Laws
    By novacain in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 12-09-2002, 02:19 PM