Sha256: aabc1a28d2e0c15985190c323e020a9dabe6da33f7a12bd433593f1bb3592ddb

Contents?: true

Size: 688 Bytes

Versions: 3

Compression:

Stored size: 688 Bytes

Contents

require 'aggro/nanomsg_transport/client'
require 'aggro/nanomsg_transport/publisher'
require 'aggro/nanomsg_transport/server'
require 'aggro/nanomsg_transport/subscriber'

module Aggro
  # Public: Transport layer over nanomsg sockets.
  module NanomsgTransport
    module_function

    def client(endpoint)
      Client.new endpoint
    end

    def publisher(endpoint)
      Publisher.new endpoint
    end

    def server(endpoint, callable = nil, &block)
      Server.new endpoint, callable, &block
    end

    def subscriber(endpoint, callable = nil, &block)
      Subscriber.new endpoint, callable, &block
    end

    def teardown
      NNCore::LibNanomsg.nn_term
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aggro-0.0.4 lib/aggro/nanomsg_transport.rb
aggro-0.0.3 lib/aggro/nanomsg_transport.rb
aggro-0.0.2 lib/aggro/nanomsg_transport.rb