# File lib/em/protocols/httpclient2.rb, line 233
233:       def self.connect *args
234:         if args.length == 2
235:           args = {:host=>args[0], :port=>args[1]}
236:         else
237:           args = args.first
238:         end
239: 
240:         h,prt,ssl = args[:host], Integer(args[:port]), (args[:tls] || args[:ssl])
241:         conn = EM.connect( h, prt, self )
242:         conn.start_tls if ssl
243:         conn.set_default_host_header( h, prt, ssl )
244:         conn
245:       end