File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,34 @@ public static function setErrorHandler(callable $callback = null)
274
274
self ::get ()->setErrorHandler ($ callback );
275
275
}
276
276
277
+ /**
278
+ * Retrieve an associative array of information about the event loop driver.
279
+ *
280
+ * The returned array MUST contain the following data describing the driver's
281
+ * currently registered watchers:
282
+ *
283
+ * [
284
+ * "defer" => ["enabled" => int, "disabled" => int],
285
+ * "delay" => ["enabled" => int, "disabled" => int],
286
+ * "repeat" => ["enabled" => int, "disabled" => int],
287
+ * "on_readable" => ["enabled" => int, "disabled" => int],
288
+ * "on_writable" => ["enabled" => int, "disabled" => int],
289
+ * "on_signal" => ["enabled" => int, "disabled" => int],
290
+ * "keep_alive" => int,
291
+ * ];
292
+ *
293
+ * keep_alive refers to the number of referenced watchers.
294
+ *
295
+ * Implementations MAY optionally add more information in the array but
296
+ * at minimum the above key => value format MUST always be provided.
297
+ *
298
+ * @return array
299
+ */
300
+ public function info ()
301
+ {
302
+ self ::get ()->info ();
303
+ }
304
+
277
305
/**
278
306
* Disable construction as this is a static class.
279
307
*/
Original file line number Diff line number Diff line change @@ -144,6 +144,31 @@ public function unreference($watcherId);
144
144
*/
145
145
public function setErrorHandler (callable $ callback = null );
146
146
147
+ /**
148
+ * Retrieve an associative array of information about the event loop driver.
149
+ *
150
+ * The returned array MUST contain the following data describing the driver's
151
+ * currently registered watchers:
152
+ *
153
+ * [
154
+ * "defer" => ["enabled" => int, "disabled" => int],
155
+ * "delay" => ["enabled" => int, "disabled" => int],
156
+ * "repeat" => ["enabled" => int, "disabled" => int],
157
+ * "on_readable" => ["enabled" => int, "disabled" => int],
158
+ * "on_writable" => ["enabled" => int, "disabled" => int],
159
+ * "on_signal" => ["enabled" => int, "disabled" => int],
160
+ * "keep_alive" => int,
161
+ * ];
162
+ *
163
+ * keep_alive refers to the number of referenced watchers.
164
+ *
165
+ * Implementations MAY optionally add more information in the array but
166
+ * at minimum the above key => value format MUST always be provided.
167
+ *
168
+ * @return array
169
+ */
170
+ public function info ();
171
+
147
172
/**
148
173
* Get the underlying loop handle.
149
174
*
You can’t perform that action at this time.
0 commit comments