shapeio
shapeio copied to clipboard
Does not prevent single-read or single-write above rate limit
If a single read or write exceeds the amount specified in the rate limit, then nothing stops that read or write from exceeding the rate limit.
For example, if I set rate limit to 1KB/s, and I Write
a 2KB []byte
, then the full 2KB will be written immediately.
I think this library should try to measure the incoming read or write sizes and buffer them out to achieve the rate limit.