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