The second version of POE::Component::Client::UserAgent is at
http://www.en-directo.net/poe/
http://www.en-directo.net/poe/POE-Component-Client-UserAgent-0.02.tar.gz

The changes since 0.01 are:
 - new method made an alias of the spawn method
 - expedite selects and _error event added to catch TCP errors
 - postbacks are used to keep the client session alive.
   The client session is responsible for creating the postback.
 - component renamed to POE::Component::Client::UserAgent
 - discard_entry overridden to try and do better cleanup
 - documentation added and posted on the web
 - CPAN style distribution created

At first I tried to use postbacks the same way as PoCoC::DNS
does, but it turns out that at least in some cases a
_garbage_collect event for the client session arrives before
the component receives the request event and gets a chance
to create a postback, and so the client session gets yanked.
I am fairly sure this same problem will come up in PoCoC::DNS
and possibly other components. So I am now requiring the
client session to create a postback before sending a request.

If there is any interest in this component (so far there's
been none), later I may try to hack LWP a little more and
make it use PoCoC::DNS, do non-blocking FTP connection
setup, reuse sockets, and so on.

It looks like LWP in its development versions found at
http://search.cpan.org/search?dist=libwww-perl
is moving in the same direction, using non-blocking sockets
that is. I wonder if we could talk to Gisle about making
LWP more POE friendly.

Kirill

Reply via email to