. * * @author Daniil Gentili * @copyright 2016-2020 Daniil Gentili * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\Stream; use Amp\Promise; /** * Read buffer interface. * * @author Daniil Gentili */ interface ReadBufferInterface { /** * Read data asynchronously. * * @param int $length How much data to read * * @return Promise */ public function bufferRead(int $length): Promise; }