public function enable()
{
if ($this->enabled) {
return;
}
if (!$this->fd) {
return;
}
$this->enabled = true;
if ($this->ev === null) {
$this->ev = new \Event(Daemon::$process->eventBase, $this->fd, \Event::READ | \Event::PERSIST, [$this, 'onReadUdp']);
$this->onBound();
} else {
$this->onAcceptEv();
}
$this->ev->add();
}