len(c.b) is 32k by setting grab.Client.BufferSize, rate limitation works as expectation when downloading files using http but https.
When download files over https the nr is always 16k on return, some thing from go's implementation or from some deeper tls packages when making http request over tls, said by google search.
But I made the waitN to wait the time for 32k not for 16k, for example: I would like the grab to download 3 times of 32k per second so waitN should sleep 330 milliseconds, the actually is 3 times of 16kb been downloaded.
len(c.b) is 32k by setting grab.Client.BufferSize, rate limitation works as expectation when downloading files using http but https.
When download files over https the nr is always 16k on return, some thing from go's implementation or from some deeper tls packages when making http request over tls, said by google search.
But I made the waitN to wait the time for 32k not for 16k, for example: I would like the grab to download 3 times of 32k per second so waitN should sleep 330 milliseconds, the actually is 3 times of 16kb been downloaded.