NAME
Gungho::Engine::POE - POE Engine For Gungho
SYNOPSIS
engine:
module: POE
config:
client:
agent:
- AgentName1
- AgentName2
max_size: 16384
follow_redirect: 2
proxy: http://localhost:8080
keepalive:
keep_alive: 10
max_open: 200
max_per_host: 20
timeout: 10
DESCRIPTION
USING KEEPALIVE
Gungho::Engine::POE uses PoCo::Client::Keepalive to control the connections. For the most part this has no visible effect on the user, but the "timeout" parameter dictate exactly how long the component waits for a new connection which means that, after finishing to fetch all the requests the engine waits for that amount of time before terminating. This is NORMAL.
METHODS
setup
sets up the engine.
run
Instantiates a PoCo::Client::HTTP session and a main session that handles the main control.
send_request($request)
Sends a request to the http client
handle_response
session_start
session_stop
session_loop
These are used as POE session states
TODO
Xango, Gungho's predecessor, tried really hard to overcome one of my pet-peeves with PoCo::Client::HTTP -- which is that, while it can handle hundreds and thousands of requests, all the requests are unnecessarily stored on memory. Xango tried to solve this, but it ended up bloating the software. We may try to tackle this later.