]> git.ipfire.org Git - thirdparty/libvirt.git/commit
esx: Add libcurl based stream driver
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sun, 30 Mar 2014 18:37:00 +0000 (20:37 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 7 Oct 2014 20:05:49 +0000 (22:05 +0200)
commit125007d373166ff514b1d241a1a4ce76b0ca336e
tree8cf79e0676f8ca779fee8b9e20416a71c773b303
parentdb6b738dde047c9b38ed41add5d00bbbdb7c5daa
esx: Add libcurl based stream driver

This allows to implement libvirt functions that use streams, such as
virDoaminScreenshot, without the need to store the downloaded data in
a temporary file first. The stream driver directly interacts with
libcurl to send and receive data.

The driver uses the libcurl multi interface that allows to do a transfer
in multiple curl_multi_perform() calls. The easy interface would do the
whole transfer in a single curl_easy_perform() call. This doesn't work
with the libvirt stream API that is driven by multiple calls to the
virStreamSend() and virStreamRecv() functions.

The curl_multi_wait() function is used to do blocking operations. But it
was added in libcurl 7.28.0. For older versions it is emulated using the
socket callback of the multi interface.

The current driver only supports blocking operations. There is already
some code in place for non-blocking mode but it is not complete.
po/POTFILES.in
src/Makefile.am
src/esx/esx_stream.c [new file with mode: 0644]
src/esx/esx_stream.h [new file with mode: 0644]
src/esx/esx_vi.c
src/esx/esx_vi.h