# File lib/termtter/httppool.rb, line 25 def self.connection(host, port = 80, ssl = false) key = connection_key(host, port) http_io = http_class.new(host, port) http_io.use_ssl = ssl http_io.verify_mode = OpenSSL::SSL::VERIFY_NONE @@connections[key] ||= http_io.start end
# File lib/termtter/httppool.rb, line 39 def self.connection_key(host, port) port == 80 ? host : [host, port.to_s].join(':') end
# File lib/termtter/httppool.rb, line 33 def self.finish(host, port = 80) key = connection_key(host, port) @@connections[key] && @@connections[key].do_finish rescue nil @@connections.delete(key) end
Generated with the Darkfish Rdoc Generator 2.