Public Instance methods
upgrade_to_h2c(request, response)
[show source]
# File lib/httpx/plugins/h2c.rb 68 def upgrade_to_h2c(request, response) 69 prev_parser = @parser 70 71 if prev_parser 72 prev_parser.reset 73 @inflight -= prev_parser.requests.size 74 end 75 76 @parser = H2CParser.new(@write_buffer, @options) 77 set_parser_callbacks(@parser) 78 @inflight += 1 79 @parser.upgrade(request, response) 80 @upgrade_protocol = "h2c" 81 82 prev_parser.requests.each do |req| 83 req.transition(:idle) 84 send(req) 85 end 86 end