public function hasEvents($timeout = 0)
    {
        $poll = new ZMQPoll();
        $poll->add($this, ZMQ::POLL_IN);
        $read = $write = array();
        $events = $poll->poll($read, $write, $timeout);
        if ($events > 0) {
            return true;
        }

        return false;
    }