Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function unreference(SocketEventInterface $socket)
 {
     $id = (int) $socket->getResource();
     if (isset($this->events[$id]) && $socket === $this->events[$id]->data) {
         $this->unreferenced[$id] = $socket;
     }
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function isFreed(SocketEventInterface $socket) : bool
 {
     $id = (int) $socket->getResource();
     return !isset($this->sockets[$id]) || $socket !== $this->sockets[$id];
 }