Module: CZMQ::FFI::LibZMQ
- Extended by:
- FFI::Library
- Defined in:
- lib/czmq-ffi-gen/libzmq.rb
Overview
Bare minimum to get some things directly from the ZMQ library itself (without the CZMQ wrapper).
Constant Summary collapse
- VERSION =
ptrs.map { |n| n.get_int(0) }.join(".").freeze
Class Method Summary collapse
-
.has?(capability) ⇒ Boolean
Whether the capability is supported.
-
.has_curve? ⇒ Boolean
Whether CURVE is supported.
-
.has_draft? ⇒ Boolean
Whether the DRAFT API is supported.
Class Method Details
.has?(capability) ⇒ Boolean
Returns whether the capability is supported.
41 42 43 44 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 41 def self.has?(capability) ptr = FFI::MemoryPointer.from_string(capability.to_s.downcase) zmq_has(ptr) == 1 end |
.has_curve? ⇒ Boolean
Returns whether CURVE is supported.
54 55 56 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 54 def self.has_curve? has? :curve end |
.has_draft? ⇒ Boolean
Returns whether the DRAFT API is supported.
48 49 50 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 48 def self.has_draft? has? :draft end |