Class: HttpLoader::Client::HttpSession
- Inherits:
-
Object
- Object
- HttpLoader::Client::HttpSession
- Extended by:
- T::Sig
- Defined in:
- lib/http_loader/client/http_session.rb
Overview
Handles normal and QPS-driven HTTP keep-alive connections.
Instance Method Summary collapse
-
#initialize(config, logger) ⇒ HttpSession
constructor
A new instance of HttpSession.
- #run(client_index, uri, http, start_time) ⇒ Object
Constructor Details
#initialize(config, logger) ⇒ HttpSession
Returns a new instance of HttpSession.
14 15 16 17 |
# File 'lib/http_loader/client/http_session.rb', line 14 def initialize(config, logger) @config = config @logger = logger end |
Instance Method Details
#run(client_index, uri, http, start_time) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/http_loader/client/http_session.rb', line 20 def run(client_index, uri, http, start_time) return if @config.slowloris_delay.positive? fire_initial_request(uri, http) maintain_keepalive(client_index, uri, http, start_time) end |