Skip to content

Commit

Permalink
Improve documentation on $bufferSize property
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed May 20, 2016
1 parent f862ac4 commit c1a71ec
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
class Stream extends EventEmitter implements DuplexStreamInterface
{
/**
* @var int|null maximum buffer size in bytes to read at once or null=infinite, until reaching EOF
* Controls the maximum buffer size in bytes to ready at once from the stream.
*
* This can be a positive number which means that up to X bytes will be read
* at once from the underlying stream resource. Note that the actual number
* of bytes read may be lower if the stream resource has less than X bytes
* currently available.
*
* This can be `null` which means read everything available from the
* underlying stream resource.
* This should read until the stream resource is not readable anymore
* (i.e. underlying buffer drained), note that this does not neccessarily
* mean it reached EOF.
*
* @var int|null
*/
public $bufferSize = 4096;

Expand Down

0 comments on commit c1a71ec

Please sign in to comment.