On Fri, Sep 07, 2001 at 12:59:38PM +0200, Arthur Bergman wrote:
> As I am redesigning PoCo::Server::HTTP wanted to make
> PoCo::Server::HTTP a subclass of of Poco::S::TCP.
>
> Currently this is impossible so I end up having two sessions, one
> which handles the new socket and one which handles the request, this
> is inefficent at best.
>
> So I propose that PC::S::TCP has a constructor argument which is
> called inside it's _start.
>
> POE::Component::Server::TCP->new( Port => $self->{Port}, Acceptor =>
> sub {}, Constructor => {});
This is a good idea, and it might be possible to extend it so that
arbirtrary states could be defined. I also like the one where
Server::TCP encapsulates simple client ReadWrite sessions, so for most
cases all you need are constructor arguments and a client input
handler.
-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net