PHP Class Kraken\Stream\AsyncStream

Inheritance: extends Stream, implements AsyncStreamInterface, use trait Kraken\Loop\LoopAwareTrait
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$buffer Kraken\Util\Buffer\BufferInterface
$listening boolean
$paused boolean

Public Methods

Method Description
__construct ( resource $resource, Kraken\Loop\LoopInterface $loop, boolean $autoClose = true )
__destruct ( )
close ( )
getBufferSize ( )
handleClose ( ) Handle close.
handleData ( ) Handle the incoming stream.
handleWrite ( ) Handle the outcoming stream.
isPaused ( )
pause ( )
resume ( )
setBufferSize ( $bufferSize )
write ( $text )

Private Methods

Method Description
writeEnd ( )

Method Details

__construct() public method

public __construct ( resource $resource, Kraken\Loop\LoopInterface $loop, boolean $autoClose = true )
$resource resource
$loop Kraken\Loop\LoopInterface
$autoClose boolean

__destruct() public method

public __destruct ( )

close() public method

public close ( )

getBufferSize() public method

public getBufferSize ( )

handleClose() public method

Handle close.
public handleClose ( )

handleData() public method

Handle the incoming stream.
public handleData ( )

handleWrite() public method

Handle the outcoming stream.
public handleWrite ( )

isPaused() public method

public isPaused ( )

pause() public method

public pause ( )

resume() public method

public resume ( )

setBufferSize() public method

public setBufferSize ( $bufferSize )

write() public method

public write ( $text )

Property Details

$buffer protected property

protected BufferInterface,Kraken\Util\Buffer $buffer
return Kraken\Util\Buffer\BufferInterface

$listening protected property

protected bool $listening
return boolean

$paused protected property

protected bool $paused
return boolean