function onEvent($socket) {
return function($watcher, $events) use($socket) {
$action = 0;
function onEvent($socket) {
return function($watcher, $events) use($socket) {
$action = 0;
function wait(int $timeout_ms = null) {
throw new BadMethodCallException("this test uses EventBase::loop()");
}
function wait(int $timeout_ms = null) {
throw new BadMethodCallException("this test uses EventBase::loop()");
}