http\Response
[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:** 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.
7
8 ## Params:
9
10 * int $chunk_size
11 Bytes to send.
12 * Optional float $delay = 1
13 Seconds to sleep.
14
15 ## Returns:
16
17 * http\Env\Response, self.