|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <async-io.hh>
Public Member Functions | |
| IndirectAsyncInputStreamToSource (AsyncInputStream &source) | |
| IndirectAsyncInputStreamToSource (box_ptr< AsyncInputStream > owned) | |
| KJ_DISALLOW_COPY_AND_MOVE (IndirectAsyncInputStreamToSource) | |
| kj::Promise< void > | feed () |
| size_t | read (char *data, size_t len) override |
| Public Member Functions inherited from nix::Source | |
| void | operator() (char *data, size_t len) |
| virtual bool | good () |
| void | drainInto (Sink &sink) |
| std::string | drain () |
Wraps a stream in a source. The returned source must not be used on the event loop that created it, otherwise read requests cannot be serviced.
| kj::Promise< void > nix::IndirectAsyncInputStreamToSource::feed | ( | ) |
Feed the source. Must be awaited fully to drain the input stream.
|
overridevirtual |
Store up to ‘len’ in the buffer pointed to by ‘data’, and return the number of bytes stored. It blocks until at least one byte is available.
Should not return 0 (generally you want to throw EndOfFile), but nothing stops that.
| EndOfFile | if there is no more data. |
Implements nix::Source.