public function end(string $finalBodyChunk = null)
{
if ($this->status === 101 && isset($finalBodyChunk)) {
throw new \DomainException("Cannot end() with body data; entity body content disallowed for Switching Protocols Response");
}
if (!$this->isStarted) {
$this->handshake();
}
$this->isStarted = true;
$this->response->end($finalBodyChunk);
return $this;
}