Roger Southwick wrote:
> What I want to do is establish a second "thread" for the Net::SMTP,
> and then have the "main" return. The 2nd "thread" will wait for sendmail
I've never used PoCo::Server::TCP but I'm assuming that if you wrap it in a
POE::Session like:
POE::Session->create(
inline_states =>
{
_start => \&start_server,
sendmail => \&sendmail,
}
);
sub start_server {
POE::Component::Server::TCP->new();
}
$poe_kernel->run();
__END__
Then you should be able to place something like:
$kernel->yield('sendmail');
at the end of your event handler for the PoCo::Server::TCP's ClientInput
State. That should allow the server to respond immediately to the client and
then send the email later. ( you could even use a $kernel->delay() if you
wanted to )
I haven't looked at the source for Server::TCP but I seem to have less
trouble with PoCo's by running them within a session of my own instead of
expecting them to stay alive outside of my control.
I hope that helps.
Todd
> It's worth a Jolt Cola... really!
p.s. They still make that stuff? ;)