title: Does setting CURLOPT_URL force to create a second FTP connection?
body: <p>I want to open a connection with an FTP server and download 2 different files. Names are totally different and I cannot use wildcards.</p>
  
  <p>I expected I could set the hostname and the file, then call <code>curl_easy_perform</code>, then set the file again and call <code>curl_easy_perform</code> one last time.</p>
  
  <p>However it seems I have to use the <code>CURLOPT_URL</code> which includes both the hostname and the filename.</p>
  
  <p>My fear is that the following code (lacks the error checking just to be short here):</p>
  
  <pre><code>...
  curl_easy_setopt(handle, CURLOPT_URL, "ftp://myserver//foo.dat");
  curl_easy_perform(handle);
  curl_easy_setopt(handle, CURLOPT_URL, "ftp://myserver//bar.png");
  curl_easy_perform(handle);
  </code></pre>
  
  <p>opens the FTP connection twice, giving a lot of avoidable overhead.</p>
  
  <p>So am I missing something here? Will libcurl notice that the hostname part is the same, thus avoiding to open the same connection twice? If not how can I open the connection only once?</p>