public function setStatus(int $code) : Response
{
if (!($code === 101 || $code >= 300)) {
throw new \DomainException("Invalid websocket handshake status ({$code}); 101 or 300-599 required");
}
$this->response->setStatus($code);
$this->status = $code;
return $this;
}