module ZMQ
Constants
- DefaultContext
The default context to be used if another context is not provided.
Public Class Methods
error_check(adjust_backtrace=false)
click to toggle source
Checks the libzmq global error number and raises it as an exception. Should be used after calling a libzmq resource that returns -1 on error. Example: ZMQ.error_check
if rc == -1
# File lib/0mq/error_check.rb, line 44 def self.error_check(adjust_backtrace=false) errno = LibZMQ.zmq_errno backtrace = adjust_backtrace ? caller[0...-2] : caller if @error_map.has_key? errno raise @error_map[errno], '', backtrace else raise SystemCallError, errno.to_s, backtrace end end
version()
click to toggle source
Returns a ZMQ::Version
object containing the libzmq library version.
# File lib/0mq/version.rb, line 5 def self.version ZMQ::Version end