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.
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).