# File lib/puppet/network/client.rb, line 65
 65:   def initialize(hash)
 66:     # to whom do we connect?
 67:     @server = nil
 68: 
 69:     if hash.include?(:Cache)
 70:       @cache = hash[:Cache]
 71:     else
 72:       @cache = true
 73:     end
 74: 
 75:     driverparam = self.class.drivername
 76:     if hash.include?(:Server)
 77:       args = {:Server => hash[:Server]}
 78:       @server = hash[:Server]
 79:       args[:Port] = hash[:Port] || Puppet[:masterport]
 80: 
 81:       @driver = self.class.xmlrpc_client.new(args)
 82: 
 83:       self.read_cert
 84: 
 85:       # We have to start the HTTP connection manually before we start
 86:       # sending it requests or keep-alive won't work.  Note that with #1010,
 87:       # we don't currently actually want keep-alive.
 88:       @driver.start if @driver.respond_to? :start and Puppet::Network::HttpPool.keep_alive?
 89: 
 90:       @local = false
 91:     elsif hash.include?(driverparam)
 92:       @driver = hash[driverparam]
 93:       if @driver == true
 94:         @driver = self.class.handler.new
 95:       end
 96:       @local = true
 97:     else
 98:       raise Puppet::Network::ClientError, "#{self.class} must be passed a Server or #{driverparam}"
 99:     end
100:   end