curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Any tips or documentation for writing a new Curl_handler (protocol)?

From: Richard W.M. Jones <rjones_at_redhat.com>
Date: Thu, 12 Jul 2018 10:18:57 +0100

On Wed, Jul 11, 2018 at 02:48:57PM +0200, Dan Fandrich wrote:
> On Wed, Jul 11, 2018 at 12:18:39PM +0100, Richard W.M. Jones wrote:
> > Personally, I'm not entirely sure that libcurl really maps well to NBD,
> > tbh, since NBD is not a "one request per URL" protocol like most other
> > libcurl-supported protocols currently are (at least for the most part).
>
> I'd have to agree to this, but for slightly different reasons. libcurl is
> designed for transferring files, whether those are bitmapped images, mail
> messages, dictionary definitions or anything else. NBD seems to be a low level
> protocol for transferring disk blocks. There's a big mismatch between the two
> (as your comment above and others indicate) and I suspect you'll find more
> problems as you try to implement support. [...]

We already use libcurl in qemu for read/write access to remote disk
images. So there's a proof of existence that it's possible.

  https://git.qemu.org/?p=qemu.git;a=blob;f=block/curl.c

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-07-12