Module: CZMQ::FFI

Extended by:
FFI::Library
Defined in:
lib/czmq-ffi-gen/signals.rb,
lib/czmq-ffi-gen/czmq/ffi.rb,
lib/czmq-ffi-gen/versions.rb,
lib/czmq-ffi-gen/gem_version.rb,
lib/czmq-ffi-gen/czmq/ffi/zdir.rb,
lib/czmq-ffi-gen/czmq/ffi/zmsg.rb,
lib/czmq-ffi-gen/czmq/ffi/zosc.rb,
lib/czmq-ffi-gen/czmq/ffi/zstr.rb,
lib/czmq-ffi-gen/czmq/ffi/zsys.rb,
lib/czmq-ffi-gen/czmq/ffi/zargs.rb,
lib/czmq-ffi-gen/czmq/ffi/zcert.rb,
lib/czmq-ffi-gen/czmq/ffi/zfile.rb,
lib/czmq-ffi-gen/czmq/ffi/zhash.rb,
lib/czmq-ffi-gen/czmq/ffi/zlist.rb,
lib/czmq-ffi-gen/czmq/ffi/zloop.rb,
lib/czmq-ffi-gen/czmq/ffi/zproc.rb,
lib/czmq-ffi-gen/czmq/ffi/zsock.rb,
lib/czmq-ffi-gen/czmq/ffi/ztrie.rb,
lib/czmq-ffi-gen/czmq/ffi/zuuid.rb,
lib/czmq-ffi-gen/czmq/ffi/zactor.rb,
lib/czmq-ffi-gen/czmq/ffi/zchunk.rb,
lib/czmq-ffi-gen/czmq/ffi/zclock.rb,
lib/czmq-ffi-gen/czmq/ffi/zframe.rb,
lib/czmq-ffi-gen/czmq/ffi/zhashx.rb,
lib/czmq-ffi-gen/czmq/ffi/zlistx.rb,
lib/czmq-ffi-gen/czmq/ffi/version.rb,
lib/czmq-ffi-gen/czmq/ffi/zarmour.rb,
lib/czmq-ffi-gen/czmq/ffi/zconfig.rb,
lib/czmq-ffi-gen/czmq/ffi/zdigest.rb,
lib/czmq-ffi-gen/czmq/ffi/ziflist.rb,
lib/czmq-ffi-gen/czmq/ffi/zpoller.rb,
lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb,
lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb,
lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb,
lib/czmq-ffi-gen/czmq_ffi_extensions.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_client.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_server.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_request.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_response.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_server_options.rb,
lib/czmq-ffi-gen/czmq/ffi/zhttp_server_connection.rb

Defined Under Namespace

Modules: Errors, LibC, LibZMQ, Signals Classes: Zactor, Zargs, Zarmour, Zcert, Zcertstore, Zchunk, Zclock, Zconfig, Zdigest, Zdir, ZdirPatch, Zfile, Zframe, Zhash, Zhashx, ZhttpClient, ZhttpRequest, ZhttpResponse, ZhttpServer, ZhttpServerConnection, ZhttpServerOptions, Ziflist, Zlist, Zlistx, Zloop, Zmsg, Zosc, Zpoller, Zproc, Zsock, Zstr, Zsys, Ztimerset, Ztrie, Zuuid

Constant Summary collapse

CZMQ_VERSION =

CZMQ library version

VERSION
ZMQ_VERSION =

ZMQ library version

LibZMQ::VERSION
GEM_VERSION =
"1.1.2"
VERSION =
'4.2.2'

Class Method Summary collapse

Class Method Details

.attach_function(name, *rest) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/czmq-ffi-gen/czmq/ffi.rb', line 39

def self.attach_function(name, *rest)
  super
rescue ::FFI::NotFoundError
  define_singleton_method name do |*|
    raise NotImplementedError, "The function #{name}() is not provided by the CZMQ library installed. Upgrade the library or compile it with --enable-drafts."
  end

  return unless $VERBOSE || $DEBUG

  warn "The function #{name}() is not provided by the installed CZMQ library."
end

.available?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/czmq-ffi-gen/czmq/ffi.rb', line 19

def self.available?
  @available
end

.has_draft?Boolean

Returns whether the CZMQ DRAFT API is available.

Returns:

  • (Boolean)

    whether the CZMQ DRAFT API is available



6
7
8
9
10
11
12
13
# File 'lib/czmq-ffi-gen/czmq_ffi_extensions.rb', line 6

def self.has_draft?
  # NOTE: We use some function that is currently declared DRAFT. Another one
  # might be needed in future versions.
  zsock_new_server(nil)
  true
rescue NotImplementedError, NoMethodError
  false
end