--- title: danog\MadelineProto\Stream\Async\BufferedStream: Buffered stream helper trait. description: Wraps the asynchronous generator methods with asynchronous promise-based methods --- # `danog\MadelineProto\Stream\Async\BufferedStream` [Back to index](../../../../index.md) > Author: Daniil Gentili Buffered stream helper trait. Wraps the asynchronous generator methods with asynchronous promise-based methods ## Method list: * `getReadBuffer(int $length): \Amp\Promise` * `getWriteBuffer(int $length, string $append): \Amp\Promise` ## Methods: ### `getReadBuffer(int $length): \Amp\Promise` Get read buffer asynchronously. Parameters: * `$length`: `int` Length of payload, as detected by this layer #### See also: * `\Amp\Promise` ### `getWriteBuffer(int $length, string $append): \Amp\Promise` Get write buffer asynchronously. Parameters: * `$length`: `int` Total length of data that is going to be piped in the buffer * `$append`: `string` Data to append after entire buffer is written #### See also: * `\Amp\Promise` --- Generated by [danog/phpdoc](https://phpdoc.daniil.it)