1 | <?php |
||
23 | class IoEvent extends Event |
||
24 | { |
||
25 | /** |
||
26 | * Next operation to perform on socket |
||
27 | * |
||
28 | * @var OperationInterface|null |
||
29 | */ |
||
30 | private $nextOperation; |
||
31 | |||
32 | /** |
||
33 | * Return next operation on socket |
||
34 | * |
||
35 | * @return OperationInterface|null Null means no further operation required |
||
36 | */ |
||
37 | 73 | public function getNextOperation() |
|
41 | |||
42 | /** |
||
43 | * Mark next operation as read |
||
44 | * |
||
45 | * @param FramePickerInterface $framePicker Frame picker for reading data |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | 7 | public function nextIsRead(FramePickerInterface $framePicker = null) |
|
53 | |||
54 | /** |
||
55 | * Mark next operation as write |
||
56 | * |
||
57 | * @param string $data Data to write |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | 7 | public function nextIsWrite($data = null) |
|
65 | |||
66 | /** |
||
67 | * Changed next operation to given one |
||
68 | * |
||
69 | * @param OperationInterface $operation Next operation |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | 18 | public function nextIs(OperationInterface $operation) |
|
77 | |||
78 | /** |
||
79 | * Mark next operation as not required |
||
80 | * |
||
81 | * @return void |
||
82 | */ |
||
83 | 7 | public function nextOperationNotRequired() |
|
87 | } |
||
88 |