Module: ZMQ::Util
Overview
These methods don’t belong to any specific context. They get included in the #Context, #Socket and #Poller classes.
Instance Method Summary collapse
-
#errno ⇒ Object
Returns the
errno
as set by the libzmq library. -
#error_string ⇒ Object
Returns a string corresponding to the currently set #errno.
-
#version ⇒ Object
Returns an array of the form [major, minor, patch] to represent the version of libzmq.
Instance Method Details
#errno ⇒ Object
Returns the errno
as set by the libzmq library.
75 76 77 |
# File 'lib/ffi-rzmq/zmq.rb', line 75 def errno LibZMQ.zmq_errno end |
#error_string ⇒ Object
Returns a string corresponding to the currently set #errno. These error strings are defined by libzmq.
82 83 84 |
# File 'lib/ffi-rzmq/zmq.rb', line 82 def error_string LibZMQ.zmq_strerror(errno).read_string end |
#version ⇒ Object
Returns an array of the form [major, minor, patch] to represent the version of libzmq.
89 90 91 92 93 94 95 |
# File 'lib/ffi-rzmq/zmq.rb', line 89 def version major = FFI::MemoryPointer.new :int minor = FFI::MemoryPointer.new :int patch = FFI::MemoryPointer.new :int LibZMQ.zmq_version major, minor, patch [major.read_int, minor.read_int, patch.read_int] end |