On Fri, 2002-08-30 at 18:19, Rocco Caputo wrote:
> I opted against using option() for this right now. Moving trace to
> _trace (and the others) is a public interface changes that will take
> months to implement. Moving the component options to option() would
> also take a long time. Rather than wait for all that, I added a
> "shutdown_on_error" value to the heap.
>
> That's also bad, but I don't think it's as bad. Changes have been
> committed to cvs; let me know how it works.
Is there some way of setting this option within
PoCO::Server::TCP->new() method?
The current code as of Revision 1.26 requires $HEAP->{shutdown_on_error}
to be set in a connection handler session. The only mean would be to
set this option in one of the Client* state handlers (most likely
ClientError). Would it be cleaner to have this available directly from
new()? For example,
POE::Component::Server::TCP->new
(
Alias => $alias,
Port => $port,
Address => $address,
Error => $error,
Shutdown_on_Error => 0,
ClientError => $client_error,
ClientInput => $client_input,
);
So it's more declarative?
Pete