1 | <?php |
||
6 | class EventLoop |
||
7 | { |
||
8 | public static $instance; |
||
9 | protected $base; |
||
10 | protected $dnsBase; |
||
11 | protected $callbacks; |
||
12 | protected $stopped = true; |
||
13 | |||
14 | /** |
||
15 | * EventLoop constructor. |
||
16 | */ |
||
17 | public function __construct() |
||
23 | |||
24 | /** |
||
25 | * Init |
||
26 | */ |
||
27 | public static function init() |
||
35 | |||
36 | /** |
||
37 | * Free |
||
38 | */ |
||
39 | public function free() { |
||
43 | |||
44 | /** |
||
45 | * @return \EventBase |
||
46 | */ |
||
47 | public function getBase() |
||
51 | |||
52 | /** |
||
53 | * @return \EventDnsBase |
||
54 | */ |
||
55 | public function getDnsBase() |
||
59 | |||
60 | /** |
||
61 | * Reinit |
||
62 | */ |
||
63 | public function reinit() |
||
67 | |||
68 | /** |
||
69 | * @param array ...$args |
||
70 | * @return mixed |
||
71 | */ |
||
72 | public function signal(...$args) |
||
76 | |||
77 | /** |
||
78 | * @param array ...$args |
||
79 | * @return mixed |
||
80 | */ |
||
81 | public function timer(...$args) |
||
85 | |||
86 | /** |
||
87 | * @param array ...$args |
||
88 | * @return \EventListener |
||
89 | */ |
||
90 | public function listener(...$args) |
||
94 | |||
95 | /** |
||
96 | * @param array ...$args |
||
97 | * @return \EventBufferEvent |
||
98 | */ |
||
99 | public function bufferEvent(...$args) |
||
103 | |||
104 | /** |
||
105 | * @param array ...$args |
||
106 | * @return mixed |
||
107 | */ |
||
108 | public function bufferEventSsl(...$args) |
||
112 | |||
113 | /** |
||
114 | * Stop |
||
115 | */ |
||
116 | public function stop() |
||
121 | |||
122 | /** |
||
123 | * @param null $cb |
||
124 | */ |
||
125 | public function interrupt($cb = null) |
||
132 | |||
133 | /** |
||
134 | * @param array ...$args |
||
135 | * @return \Event |
||
136 | */ |
||
137 | public function event(...$args) |
||
141 | |||
142 | /** |
||
143 | * Run |
||
144 | */ |
||
145 | public function run() |
||
155 | } |