Method: HTTPX::Channel::HTTP1#initialize

Defined in:
lib/httpx/channel/http1.rb

#initialize(buffer, options) ⇒ HTTP1

Returns a new instance of HTTP1.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/httpx/channel/http1.rb', line 12

def initialize(buffer, options)
  @options = Options.new(options)
  @max_concurrent_requests = @options.max_concurrent_requests
  @retries = options.max_retries
  @parser = HTTP::Parser.new(self)
  @parser.header_value_type = :arrays
  @buffer = buffer
  @version = [1, 1]
  @pending = []
  @requests = []
  @has_response = false
end