mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 00:11:07 +00:00
c8c354d1e6
The component will now abort an ongoing download attempt if it stalls for given amount of time, the default is 10 seconds. Fixes #3346. |
||
---|---|---|
.. | ||
component.cc | ||
README | ||
target.mk |
A small frontend to the libcURL library. Configuration ------------- The component will try to fetch the given resource. If this operation stalls for a given amount of time, the transfer will be aborted. The duration can be set by setting the 'progress_timeout' attribute in the '<config>' node. It is specified in milliseconds and the default value is 10 seconds. The following config snippets illustrate its usage. Load the socket plugin in to the fetchurl binary (print output to log): !<config> ! <libc stdout="/dev/log" stderr="/dev/log" ! rtc="/dev/rtc" socket="/socket"/> ! <vfs> ! <dir name="dev"> ! <log/> <null/> ! <inline name="rtc">2000-01-01 00:00</inline> ! <inline name="random">01234567890123456789</inline> ! </dir> ! <dir name="socket"> <lwip dhcp="yes"/> </dir> ! </vfs> ! <fetch url="http://genode.org/about/LICENSE" ! path="/dev/log" retry="3"/> ! <report progress="yes"/> !</config> Use the socket plugin of an other vfs (store file in a directory): !<config> ! <libc stdout="/dev/log" stderr="/dev/log" ! rtc="/dev/rtc" socket="/socket"/> ! <vfs> ! <dir name="dev"> ! <log/> <null/> ! <inline name="rtc">2000-01-01 00:00</inline> ! <inline name="random">01234567890123456789</inline> ! </dir> ! <fs name="tcpip"/> ! <dir name="download"> <fs label="download"/> </dir> ! </vfs> ! <fetch url="http://genode.org/about/LICENSE" ! path="/download/LICENSE" retry="3"/> ! <report progress="yes"/> !</config> The two primary options are 'url', the URL to fetch, and 'path', the file-system path where fetched data is written. Secondary options are 'retry' and 'proxy'. Retry is the number of fetch attempts to make following failure, and proxy is used to reroute requests. An example TOR proxying configuration: ! <fetch url="http://genode.org/about/LICENSE" path="LICENSE" ! proxy="sock5://10.0.0.1:9050" /> The presence of a 'report' node in the configuration with an affirmative 'progress' attribute will enable a progress report. The 'delay_ms' attribute will set the minimum interval between reports and defauts to 100 miliseconds. The report format is as follows. ! <progress> ! <fetch url="..." total="100.0" now="50.0"/> ! </progress>