mdref.json config
[mdref/mdref-http] / http / Env / Response / setThrottleRate.md
1 # http\Env\Response http\Env\Response::setThrottleRate(int $chunk_size[, float $delay = 1])
2
3 Enable throttling.
4 Send $chunk_size bytes every $delay seconds.
5
6 > ***NOTE:***
7 > If you need throttling by regular means, check for other options in your stack, because this method blocks the executing process/thread until the response has completely been sent.
8
9 ## Params:
10
11 * int $chunk_size
12 Bytes to send.
13 * Optional float $delay = 1
14 Seconds to sleep.
15
16 ## Returns:
17
18 * http\Env\Response, self.