cURL / Mailing Lists / curl-library / Single Mail


Re: Read and write on the same cURL handle

From: Richard W.M. Jones <>
Date: Fri, 27 Jun 2014 12:10:24 +0100

On Fri, Jun 27, 2014 at 09:35:20AM +0200, Dan Fandrich wrote:
> On Thu, Jun 26, 2014 at 02:50:57PM +0100, Richard W.M. Jones wrote:
> > Maybe the confusion is that I'm using the "easy" API, and in each call
> > I'm using curl_easy_perform in a loop until the read or write is
> > finished. See:
> >
> The loop around curl_easy_perform shows a fundamental misunderstanding of how
> the API works. curl_easy_perform() should be called only once, and once the
> transfer that has been set up on the handle has been completed, the function
> returns. Calling it in a loop is equivalent to clicking on the same link in a
> browser over and over again. Once the transfer is complete, you can use
> curl_easy_getinfo to query information about the transfer that just occurred.

Ok, I can fix that, thanks.


Richard Jones, Virtualization Group, Red Hat
Read my programming and virtualization blog:
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
List admin:
Received on 2014-06-27