def wait(timeout = -1)
      rc = ZMQ.poller_wait(@poller_ptr, @event_ptr, timeout)
      if rc == -1
        case CZMQ::FFI::Errors.errno
        # NOTE: ETIMEDOUT for backwards compatibility, although this API is
          # still DRAFT.
        when Errno::EAGAIN::Errno, Errno::ETIMEDOUT::Errno
          return nil
        else
          HasFFIDelegate.raise_zmq_err
        end
      end
      return Event.new(self, @event_ptr)
    end
def wait(timeout = -1)
      rc = ZMQ.poller_wait(@poller_ptr, @event_ptr, timeout)
      if rc == -1
        case CZMQ::FFI::Errors.errno
        # NOTE: ETIMEDOUT for backwards compatibility, although this API is
          # still DRAFT.
        when Errno::EAGAIN::Errno, Errno::ETIMEDOUT::Errno
          return nil
        else
          HasFFIDelegate.raise_zmq_err
        end
      end
      return Event.new(self, @event_ptr)
    end
Waits for registered sockets to become readable or writable, depending
 on what you're interested in.

 @param timeout [Integer] how long to wait in ms, or 0 to avoid blocking,
   or -1 to wait indefinitely
 @return [Event] the first event of interest
 @return [nil] if the timeout expired or
 @raise [SystemCallError] if this failed