Calculate Bandwith

This is a discussion on Calculate Bandwith within the Networking/Device Communication forums, part of the General Programming Boards category; Hi, i have a little problem =D. The description is: I have a file server that it must send of ...

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

    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.

    thanks.
    cscience.org
    gobolinux.org
    Gobolinux user: 00101100

  2. #2
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    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-26-2008, 11:24 PM
  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, 01:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21