I’m using raw sockets on windows and I’m trying to find a way to limit the max connection speed over a group of sockets.
For example I have 3 sockets to 3 servers and want to limit total download speed to 1mb.
I googled and cant find any thing related. Any ideas?
If you want to limit the download speed to 1 MB per second, manage your recv() calls in such a way that you do not recv() more than 1 MB in a single second. Once you have read the maximum 1 MB, throttle the thread (using ThreadSleep) until the next second. That’s just a simple approach.