Class: Msf::Aggregator::HttpForwarder
- Defined in:
- lib/msf/aggregator/http_forwarder.rb
Constant Summary collapse
- CONNECTION_TIMEOUT =
one minute
60
Instance Attribute Summary collapse
-
#log_messages ⇒ Object
Returns the value of attribute log_messages.
-
#response_queues ⇒ Object
readonly
Returns the value of attribute response_queues.
Instance Method Summary collapse
- #forward(connection) ⇒ Object
-
#initialize ⇒ HttpForwarder
constructor
A new instance of HttpForwarder.
Methods inherited from Forwarder
Constructor Details
#initialize ⇒ HttpForwarder
Returns a new instance of HttpForwarder.
16 17 18 |
# File 'lib/msf/aggregator/http_forwarder.rb', line 16 def initialize super end |
Instance Attribute Details
#log_messages ⇒ Object
Returns the value of attribute log_messages.
13 14 15 |
# File 'lib/msf/aggregator/http_forwarder.rb', line 13 def end |
#response_queues ⇒ Object (readonly)
Returns the value of attribute response_queues.
14 15 16 |
# File 'lib/msf/aggregator/http_forwarder.rb', line 14 def response_queues @response_queues end |
Instance Method Details
#forward(connection) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/msf/aggregator/http_forwarder.rb', line 20 def forward(connection) #forward input requests request_obj = Msf::Aggregator::Http::Responder.get_data(connection, false) uri = Msf::Aggregator::Http::Request.parse_uri(request_obj) @forwarder_mutex.synchronize do unless uri.nil? unless @response_queues[uri] uri_responder = Msf::Aggregator::Http::Responder.new(uri) uri_responder. = @response_queues[uri] = uri_responder end @response_queues[uri].queue << request_obj @response_queues[uri].time = Time.now else connection.close end end end |