Public Instance methods
interests()
[show source]
# File lib/httpx/plugins/upgrade/h2.rb 25 def interests 26 return super unless connecting? && @parser 27 28 connect 29 30 return @io.interests if connecting? 31 32 super 33 end
upgrade_to_h2()
[show source]
# File lib/httpx/plugins/upgrade/h2.rb 35 def upgrade_to_h2 36 enqueue_pending_requests_from_parser(@parser) 37 38 @parser = @options.http2_class.new(@write_buffer, @options) 39 set_parser_callbacks(@parser) 40 @upgrade_protocol = "h2" 41 42 # what's happening here: 43 # a deviation from the state machine is done to perform the actions when a 44 # connection is closed, without transitioning, so the connection is kept in the pool. 45 # the state is reset to initial, so that the socket reconnect works out of the box, 46 # while the parser is already here. 47 purge_after_closed 48 transition(:idle) 49 end