module CZTop::Poller::ZMQ

CZTop's interface to the low-level +zmq_poller_*()+ functions.

Constants

POLLERR
POLLIN
POLLOUT

Public Class Methods

attach_function(function_nickname, function_name, *args) click to toggle source

Gracefully attaches a function. If it's not available, this creates a placeholder class method which, when called, simply raises NotImplementedError with a helpful message.

Calls superclass method
# File lib/cztop/poller/zmq.rb, line 53
def self.attach_function(function_nickname, function_name, *args)
  super
rescue ::FFI::NotFoundError
  if $VERBOSE || $DEBUG
    warn "CZTop: The ZMQ function #{function_name}() is not available. Don't use CZTop::Poller."
  end
  define_singleton_method(function_nickname) do |*|
    raise NotImplementedError, "compile ZMQ with --enable-drafts"
  end
end