Method: UV::HttpEndpoint::Connection#initialize
- Defined in:
- lib/uv-rays/http_endpoint.rb
#initialize(host, port, tls, proxy, client) ⇒ Connection
Returns a new instance of Connection.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/uv-rays/http_endpoint.rb', line 57 def initialize(host, port, tls, proxy, client) @target_host = host @client = client @request = nil if proxy super(proxy[:host], proxy[:port]) if tls @negotiating = true @proxy = proxy @connect_host = host @connect_port = port end else super(host, port) start_tls if tls end end |