Sha256: cb165f94c24ec0a981fa3f91e4ced5485fc06fe09db70fc492b8362a5f3310a0

Contents?: true

Size: 705 Bytes

Versions: 3

Compression:

Stored size: 705 Bytes

Contents

require 'ffi-rzmq'

# Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.
module EZMQ
  # Wrapper class to simplify 0MQ sockets.
  class Context < ZMQ::Context
    # Creates a 0MQ context.
    #
    # Contexts are essentially resource containers or sandboxes for 0MQ. They
    #   allow multiple sockets to share access to system resources, and an
    #   entire context can be terminated, closing all sockets within it.
    #
    # Contexts are useful when dealing with the 'inproc' transport / protocol.
    #   Any sockets that need to communicate in-process must share a context.
    #
    # @return [Context] a new instance of Context.
    #
    def initialize
      super
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ezmq-0.3.7 lib/ezmq/context.rb
ezmq-0.3.6 lib/ezmq/context.rb
ezmq-0.3.5 lib/ezmq/context.rb