Class: Protobuf::Rpc::Connector

Inherits:
Object
  • Object
show all
Defined in:
lib/protobuf/rpc/connector.rb

Class Method Summary collapse

Class Method Details

.connector_for_clientObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/protobuf/rpc/connector.rb', line 5

def self.connector_for_client
  if defined?(Protobuf::ClientType)
    case Protobuf::ClientType 
    when "Socket" then 
      ::Protobuf::Rpc::Connectors::Socket
    else
      ::Protobuf::Rpc::Connectors::EventMachine
    end
  else
    ::Protobuf::Rpc::Connectors::EventMachine
  end
end