shapeio icon indicating copy to clipboard operation
shapeio copied to clipboard

Does not prevent single-read or single-write above rate limit

Open sbward opened this issue 4 years ago • 0 comments

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.

sbward avatar Aug 28 '19 01:08 sbward