Sha256: 09de01806f27305dc86e8bf6a394f08b98040d425d1711d83179945e64db655a

Contents?: true

Size: 662 Bytes

Versions: 11

Compression:

Stored size: 662 Bytes

Contents

module Protobuf
  module Rpc
    class Connector

      # Returns a connector class for the pre-defined connector_type.
      def self.connector_for_client(reload = false)
        if reload || @_connector.nil?
          @_connector = case ::Protobuf.connector_type
                        when :evented then
                          ::Protobuf::Rpc::Connectors::EventMachine
                        when :zmq then
                          ::Protobuf::Rpc::Connectors::Zmq
                        else
                          ::Protobuf::Rpc::Connectors::Socket
                        end
        end

        return @_connector
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
protobuf-2.1.0 lib/protobuf/rpc/connector.rb
protobuf-2.0.3 lib/protobuf/rpc/connector.rb
protobuf-2.0.2 lib/protobuf/rpc/connector.rb
protobuf-2.0.1 lib/protobuf/rpc/connector.rb
protobuf-2.0.0 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc6 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc5 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc4 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc3 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc2 lib/protobuf/rpc/connector.rb
protobuf-2.0.0.rc1 lib/protobuf/rpc/connector.rb