Limiting upload speed (winsock)
Hi, I made a small tool to upload files to a server (nntp) with Winsock. More and more users are asking me to build in a feature to limit the upload speed, but I have no idea how this is done. I searched the forums, google and newsgroups, but can't find any information.
Basically I would like to have a textbox on the form and when the user types '25' into the textbox, then the upload speed is limited to 25 kB/s.
Does anybody have any information about how to do this?
Re: Limiting upload speed (winsock)
why not start a stopwatch when the upload begins and then every time a packet is sent accumulate the number of bytes sent.
then divide accum bytes by elapsed seconds.