cURL / Mailing Lists / curl-library / Single Mail


Re: Most efficient way?

From: Dan Fandrich <>
Date: Fri, 8 Aug 2008 17:37:12 -0700

On Fri, Aug 08, 2008 at 08:24:30PM -0400, Patrick wrote:
> I need to connect to an FTP server and run some commands. I'll
> eventually perform a transfer, but I need to wait for the result of
> each individual FTP command and transfer only if they were successful.
> Is this best and most efficient way to do this to setup an initial
> easy handle, then set CURLOPT_QUOTE with the command, perform() it,
> check result, set CURLOPT_QUOTE with the next command, etc? I'm
> assuming that since I'm not closing the connection, this is relatively
> efficient.

libcurl will abort the transfer after the first quote command fails, so you
can just pass in a list containing all the quote commands and be done
with it.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-08-09