Kraken\Ipc\Zmq\ZmqSocket::attachReadListener PHP Méthode

attachReadListener() public méthode

Attach read listener.
public attachReadListener ( )
    public function attachReadListener()
    {
        $this->loop->addReadStream($this->fd, [$this, 'handleEvent']);
    }

Usage Example

Exemple #1
0
 /**
  * @param RawZMQSocket $socket
  * @return ZmqSocket
  */
 private function wrapSocket(RawZMQSocket $socket)
 {
     $wrapped = new ZmqSocket($socket, $this->loop);
     if ($this->isReadableSocketType($socket->getSocketType())) {
         $wrapped->attachReadListener();
     }
     return $wrapped;
 }