Aerys\Websocket\Handshake::setStatus PHP Method

setStatus() public method

{@inheritDoc}
public setStatus ( integer $code ) : Aerys\Response
$code integer
return Aerys\Response
    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;
    }