Thread: Calculate Bandwith

  1. #1
    Registered User scrapedbr's Avatar
    Join Date
    May 2003

    Calculate Bandwith

    Hi, i have a little problem =D.
    The description is:

    I have a file server that it must send of equal form a file for each client. The bandwith for each client have to be equal and need to be calculated each time a client connect to the server.

    Suppose the server's bandwith is 100Mbits.. with 2 clients: 50Mbits for each one.. with 3 33,3Mbits.. an so on.

    How can i calculate the client's bandwith ??
    The language used is C.

    Gobolinux user: 00101100

  2. #2
    Join Date
    Feb 2003
    uhm.... I am pretty sure all you do is send the same size buffer each second regardless of connection, say if you want to limit to 50 KB/s as a max, send a buffer of size 50KB every second, instead of sending a buffer that is = the size of the file, in which case, it will be recieved at the highed download(theirs)/upload(yours) rate. I am pretty sure most ftp servers have some sort of variable in their script to limit bandwidth(I know apache has an extension that will prevent transfer above a certain amount).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Right Triangle Program
    By BSmith4740 in forum C# Programming
    Replies: 9
    Last Post: 02-27-2008, 12:24 AM
  2. how to calculate all files in disk?
    By kirmelyte in forum C Programming
    Replies: 1
    Last Post: 04-30-2006, 02:47 PM
  3. Calculate Point in Area
    By ilmarculin in forum C Programming
    Replies: 16
    Last Post: 04-07-2005, 07:03 AM
  4. Small program that has to calculate miles per gallon
    By Guti14 in forum C++ Programming
    Replies: 6
    Last Post: 01-06-2004, 02:47 PM