Link Search Menu Expand Document

danog\MadelineProto\ResumableDownloadStream

Back to index

Author: Daniil Gentili daniil@daniil.it

A readable stream with the contents of a file downloaded from Telegram.

The stream can be serialized: once unserialized, the download is restarted from the end of the last chunk returned by {@see self::read()} before serialization.

The progress callback and the cancellation passed when creating the stream are not preserved by serialization.

Method list:

Methods:

read(?\Amp\Cancellation $cancellation = NULL): ?string

Parameters:

  • $cancellation: ?\Amp\Cancellation

See also:

  • \Amp\Cancellation

isReadable(): bool

close(): void

isClosed(): bool

onClose(\Closure $onClose): void

Parameters:

  • $onClose: \Closure

See also:

  • \Closure

getIterator(): \Traversable<int, string>

See also:

  • \Traversable

Generated by danog/phpdoc