Class ReadableStream

A stream can be used by just one task at a time, but one task can consume multiple streams.

class ReadableStream;

Streams may be populated by async sources (in which case they must be called from a fiber task), from a function generating the data on demand (including an input range), from memory, or from a synchronous file.

A stream of heterogeneous types is compatible with input ranges.

It reads binary data.

Methods

NameDescription
feedData (data) Feeds data into the stream, which can be consumed by get. If a task is waiting for more data to satisfy its get requests, this will trigger those tasks to resume.
get (byteOrder, file, line) Gets data of the specified type T off the stream. The byte order of the T on the stream must be specified unless it is irrelevant (e.g. single byte entries).
isClosed ()
waitForAdditionalData () You basically have to use this thing from a task