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.
31 32 33 34 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 31 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.
44 45 46 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 44 def self.has_curve? has? :curve end |
.has_draft? ⇒ Boolean
Returns whether the DRAFT API is supported.
38 39 40 |
# File 'lib/czmq-ffi-gen/libzmq.rb', line 38 def self.has_draft? has? :draft end |