Pike v8.0 release 1738

Method Shuffler.Shuffle()->add_source()


Method add_source

void add_source(mixed source, int|void start, int|void length)

Description

Add a new source to the list of data sources. The data from the sources will be sent in order.

If start and length are not specified, the whole source will be sent, if start but not length is specified, the whole source, excluding the first start bytes will be sent.

Currently supported sources

string

An ordinary 8-bit wide pike string.

System.Memory

An initialized instance of the System.Memory class.

Stdio.File

Stdio.File instance pointing to a normal file.

Stdio.Stream

Stdio.File instance pointing to a stream of some kind (network socket, named pipe, stdin etc). Blocking or nonblocking.

Stdio.NonblockingStream|Stdio.Stream

An object implementing the callback based reading (set_read_callback and set_close_callback).