class CZTop::Poller::ZMQ::PollerEvent

This represents a zmq_poller_event_t as in:

typedef struct zmq_poller_event_t
{
    void *socket;
    int fd;
    void *user_data;
    short events;
} zmq_poller_event_t;

Public Instance Methods

readable?() click to toggle source

@return [Boolean] whether the socket is readable

# File lib/cztop/poller/zmq.rb, line 33
def readable?
  (self[:events] & POLLIN) > 0
end
writable?() click to toggle source

@return [Boolean] whether the socket is writable

# File lib/cztop/poller/zmq.rb, line 38
def writable?
  (self[:events] & POLLOUT) > 0
end