public function flush()
{
if ($this->state & self::ENDED) {
throw new \LogicException("Cannot flush: response already sent");
} elseif ($this->state & self::STARTED) {
$this->codec->send(false);
} else {
throw new \LogicException("Cannot flush: response output not started");
}
}