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;
    }
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;
    }
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 ; }
Poll for new Events on this Socket.

@param integer $timeout Timeout in milliseconds. Defaults to 0 (return immediately).

@return boolean
Poll for new Events on this Socket .