curl-library
Re: Read and write on the same cURL handle
From: Richard W.M. Jones <rjones_at_redhat.com>
Date: Mon, 23 Jun 2014 13:06:58 +0100
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
request?
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
order.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-06-23