Method: Dalli::Protocol::Binary#initialize

Defined in:
lib/dalli/protocol/binary.rb

#initialize(attribs, client_options = {}) ⇒ Binary

Returns a new instance of Binary.



28
29
30
31
32
33
34
# File 'lib/dalli/protocol/binary.rb', line 28

def initialize(attribs, client_options = {})
  hostname, port, socket_type, @weight, user_creds = ServerConfigParser.parse(attribs)
  @options = client_options.merge(user_creds)
  @value_marshaller = ValueMarshaller.new(@options)
  @connection_manager = ConnectionManager.new(hostname, port, socket_type, @options)
  @response_processor = ResponseProcessor.new(@connection_manager, @value_marshaller)
end