/** * @param ZMQSocket $socket * * @return SocketWrapper */ protected function wrapSocket(ZMQSocket $socket) { $wrapped = new SocketWrapper($socket, $this->loop); if ($this->isReadableSocketType($socket->getSocketType())) { $wrapped->attachReadListener(); } return $wrapped; }