1 | <?php |
||
8 | class DuplexFifo |
||
9 | { |
||
10 | /** |
||
11 | * The read stream |
||
12 | * @var ReadableFifo |
||
13 | */ |
||
14 | protected $readFifo; |
||
15 | |||
16 | /** |
||
17 | * The write stream, |
||
18 | * @var WritableFifo |
||
19 | */ |
||
20 | protected $writeFifo; |
||
21 | |||
22 | public function __construct($pathname, $readBlocking = true, $writeBlocking = true) |
||
27 | |||
28 | /** |
||
29 | * Sets the read fifo blocking mode |
||
30 | * @param boolean $blocking |
||
31 | */ |
||
32 | public function setReadBlocking($blocking) |
||
36 | |||
37 | /** |
||
38 | * Sets the read fifo blocking mode |
||
39 | * @param boolean $blocking |
||
40 | */ |
||
41 | public function setWriteBlocking($blocking) |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function read() |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function write($message) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function close() |
||
70 | |||
71 | /** |
||
72 | * Gets the read-only fifo |
||
73 | * @return ReadableFifo |
||
74 | */ |
||
75 | public function getReadFifo() |
||
79 | |||
80 | /** |
||
81 | * Gets the write-only fifo |
||
82 | * @return WritableFifo |
||
83 | */ |
||
84 | public function getWriteFifo() |
||
88 | |||
89 | public function __destruct() |
||
93 | } |
||
94 |