cURL / Mailing Lists / curl-library / Single Mail


Re: Read and write on the same cURL handle

From: Richard W.M. Jones <>
Date: Mon, 23 Jun 2014 13:06:58 +0100

On Mon, Jun 23, 2014 at 10:44:17AM +0100, Richard W.M. Jones wrote:
> Can a single cURL handle be "switched" between reading and uploading?
> And if so, how do you do that?
> Or should the plugin open two handles (one for reading, one for
> writing)?

Or a third option: Should the plugin open a new cURL handle for every

Or a fourth: Keep open a collection of cURL handles? (And if so, what
policy to use to decide when to open a new handle or close an old one?)

Note that NBD pread & pwrite requests are generally quite small,
frequent, and of course unpredictable in both size, frequency and


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-23