public function setProtocol($protocol) {

        $proto = strtoupper($protocol);

        if ( !in_array($proto, static::$supported_protocols) ){
            throw new Exception("Invalid RPC protocol");
        }

        $this->protocol = $proto;

        return $this;

    }