PHP Class Jenner\SimpleFork\Queue\Pipe

Afficher le fichier Open project: huyanping/simple-fork-php

Protected Properties

Свойство Type Description
$block boolean
$filename string
$read resource
$write resource

Méthodes publiques

Méthode 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 méthode

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 méthode

public __destruct ( )

close() public méthode

public close ( )

read() public méthode

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
Résultat string

remove() public méthode

public remove ( )

setBlock() public méthode

public setBlock ( $block = true )

write() public méthode

public write ( $message ) : integer
$message
Résultat integer

Property Details

$block protected_oe property

protected bool $block
Résultat boolean

$filename protected_oe property

protected string $filename
Résultat string

$read protected_oe property

protected resource $read
Résultat resource

$write protected_oe property

protected resource $write
Résultat resource