Method: HTTPX::Channel#initialize
- Defined in:
- lib/httpx/channel.rb
#initialize(type, uri, options) ⇒ Channel
Returns a new instance of Channel.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/httpx/channel.rb', line 70 def initialize(type, uri, ) @type = type @uri = uri @origins = [@uri.origin] = Options.new() @window_size = .window_size @read_buffer = Buffer.new(BUFFER_SIZE) @write_buffer = Buffer.new(BUFFER_SIZE) @pending = [] on(:error) { |ex| on_error(ex) } transition(:idle) end |