In the script example, which I want to be executed as a PDK PerlSvc
program (Win32 Service), the accept() method is blocking.

Is there another module or a technique that I could use to eliminate the
blocking and have the loop continue so that if the service control
manager sends a STOP to the service the program will cycle back to the
PerlSvc ContinueRun function stopping the loop?

my $SMTPserver = new Net::SMTP::Server();
while (ContinueRun(1)) {
   # Place main code or call to main code here
   my $conn = $SMTPserver->accept();
   my $client = new Net::SMTP::Server::Client($conn);
   if (! $client) {
      WriteLog(LogFileName(), "Error: ABEND: Unable to handle client
connection: $!");
   }
   $client->process;
}

Howard A. Bullock
Tyco Electronics
Computer Security
717-810-3584
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to