develooper Front page | perl.qpsmtpd | Postings from June 2005

Re: qpsmtpd processes in an infinite loop

Thread Previous | Thread Next
From:
Matt Sergeant
Date:
June 20, 2005 11:17
Subject:
Re: qpsmtpd processes in an infinite loop
Message ID:
b7a1ed4b0a907e46cb2b075ac9f67ca4@sergeant.org
On 20 Jun 2005, at 14:07, Peter Eisch wrote:

> Is there a way to "share" the raw socket with APR::Socket for just a  
> short
> time?  At the beginning of the tcp session it would be nice to sit on a
> select() for a bit and ensure the client doesn't try forcing down a  
> session.
> They're not supposed to say anything until we present them with a  
> banner,
> but there's no timestamp or way to ensure that the client didn't speak  
> until
> spoken to.

No need - there's a poll interface:

   my $rc = $socket->poll($c->pool, $timeout, APR::Const::POLLIN);

See  
http://svn.apache.org/repos/asf/perl/modperl/trunk/t/protocol/ 
TestProtocol/echo_nonblock.pm for details. We just need to port  
check_early_talker to that framework.

Matt.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About