Ratchet\WebSocket\Version\RFC6455::isValidCloseCode PHP Method

isValidCloseCode() public method

Determine if a close code is valid
public isValidCloseCode ( $val ) : boolean
return boolean
    public function isValidCloseCode($val)
    {
        if (array_key_exists($val, $this->closeCodes)) {
            return true;
        }
        if ($val >= 3000 && $val <= 4999) {
            return true;
        }
        return false;
    }