PHP Class Jenner\SimpleFork\Queue\Pipe

Datei anzeigen Open project: huyanping/simple-fork-php

Protected Properties

Property Type Description
$block boolean
$filename string
$read resource
$write resource

Public Methods

Method Description
__construct ( string $filename = '/tmp/simple-fork.pipe', integer $mode = 438, boolean $block = false )
__destruct ( )
close ( )
read ( integer $size = 1024 ) : string if the stream is blocking, you would better set the value of size, it will not return until the data size is equal to the value of param size
remove ( )
setBlock ( $block = true )
write ( $message ) : integer

Method Details

__construct() public method

public __construct ( string $filename = '/tmp/simple-fork.pipe', integer $mode = 438, boolean $block = false )
$filename string fifo filename
$mode integer
$block boolean if blocking

__destruct() public method

public __destruct ( )

close() public method

public close ( )

read() public method

if the stream is blocking, you would better set the value of size, it will not return until the data size is equal to the value of param size
public read ( integer $size = 1024 ) : string
$size integer
return string

remove() public method

public remove ( )

setBlock() public method

public setBlock ( $block = true )

write() public method

public write ( $message ) : integer
$message
return integer

Property Details

$block protected_oe property

protected bool $block
return boolean

$filename protected_oe property

protected string $filename
return string

$read protected_oe property

protected resource $read
return resource

$write protected_oe property

protected resource $write
return resource