Module: EZMQ

Defined in:
lib/ezmq/push.rb,
lib/ezmq/pair.rb,
lib/ezmq/pull.rb,
lib/ezmq/reply.rb,
lib/ezmq/socket.rb,
lib/ezmq/publish.rb,
lib/ezmq/request.rb,
lib/ezmq/context.rb,
lib/ezmq/subscribe.rb

Overview

Syntactic sugar for 0MQ, because Ruby shouldn't feel like C.

Defined Under Namespace

Classes: Client, Context, Pair, Publisher, Puller, Pusher, Server, Socket, Subscriber

Class Method Summary (collapse)

Class Method Details

+ (Array<EZMQ::Pair>) create_linked_pair(**options)

Returns a pair of EZMQ::Pair sockets connected to each other.

Parameters:

  • options (Hash)

    optional parameters.

Returns:

See Also:



31
32
33
34
35
36
37
38
# File 'lib/ezmq/pair.rb', line 31

def self.create_linked_pair(**options)
  options[:context] ||= EZMQ::Context.new
  options[:transport] ||= :inproc
  options[:address] ||= options[:context].context.address
  %i(bind connect).map do |mode|
    EZMQ::Pair.new mode, options
  end
end