public function getConnection(mysqltcs $client, $host, $user, $password, $name, $key = "", $cert = "", $ca = "") {
        //the client has already a connection
        $clientKey = array_search($client, $this->clients);
        if ($clientKey !== false) {
            throw new MysqlConnectionException("The client has already a connection, it must be removed before");
        }

        //get new key
        $clientKey = count($this->clients);

        //I get an existing connection or I create a new one
        $this->connections[$clientKey] = $this->findConnection($host, $user, $password, $name, $key, $cert, $ca);

        //return connection
        $this->clients[$clientKey] = $client;
        return $this->connections[$clientKey];
    }