PHP Class React\Stream\Stream

Inheritance: extends Evenement\EventEmitter, implements React\Stream\ReadableStreamInterface, implements React\Stream\WritableStreamInterface
Show file Open project: reactphp/stream Class Usage Examples

Public Properties

Property Type Description
$bufferSize integer | null 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.
$stream

Protected Properties

Property Type Description
$buffer
$closing
$loop
$readable
$writable

Public Methods

Method Description
__construct ( $stream, React\EventLoop\LoopInterface $loop )
close ( )
end ( $data = null )
getBuffer ( )
handleClose ( )
handleData ( $stream )
isReadable ( )
isWritable ( )
pause ( )
pipe ( React\Stream\WritableStreamInterface $dest, array $options = [] )
resume ( )
write ( $data )

Method Details

__construct() public method

public __construct ( $stream, React\EventLoop\LoopInterface $loop )
$loop React\EventLoop\LoopInterface

close() public method

public close ( )

end() public method

public end ( $data = null )

getBuffer() public method

public getBuffer ( )

handleClose() public method

public handleClose ( )

handleData() public method

public handleData ( $stream )

isReadable() public method

public isReadable ( )

isWritable() public method

public isWritable ( )

pause() public method

public pause ( )

pipe() public method

public pipe ( React\Stream\WritableStreamInterface $dest, array $options = [] )
$dest React\Stream\WritableStreamInterface
$options array

resume() public method

public resume ( )

write() public method

public write ( $data )

Property Details

$buffer protected property

protected $buffer

$bufferSize public property

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.
public int|null $bufferSize
return integer | null

$closing protected property

protected $closing

$loop protected property

protected $loop

$readable protected property

protected $readable

$stream public property

public $stream

$writable protected property

protected $writable