Module: ZMQ::LibZMQ
- Extended by:
- FFI::Library
- Defined in:
- lib/ffi-rzmq/libzmq.rb,
lib/ffi-rzmq/libzmq.rb,
lib/ffi-rzmq/libzmq.rb
Overview
Wraps the libzmq library and attaches to the functions that are common across the 2.x, 3.x and 4.x APIs.
Defined Under Namespace
Modules: PollItemLayout
Classes: Msg, PollItem
Class Method Summary
collapse
Class Method Details
.version ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/ffi-rzmq/libzmq.rb', line 53
def self.version
unless @version
major = FFI::MemoryPointer.new :int
minor = FFI::MemoryPointer.new :int
patch = FFI::MemoryPointer.new :int
LibZMQ.zmq_version major, minor, patch
@version = {:major => major.read_int, :minor => minor.read_int, :patch => patch.read_int}
end
@version
end
|
.version2? ⇒ Boolean
65
|
# File 'lib/ffi-rzmq/libzmq.rb', line 65
def self.version2?() version[:major] == 2 && version[:minor] >= 1 end
|
.version3? ⇒ Boolean
67
|
# File 'lib/ffi-rzmq/libzmq.rb', line 67
def self.version3?() version[:major] == 3 && version[:minor] >= 1 end
|
.version4? ⇒ Boolean
69
|
# File 'lib/ffi-rzmq/libzmq.rb', line 69
def self.version4?() version[:major] == 4 end
|