while( 1 ) {
next unless ( $client = $sock->accept() );
my $paddr = $client->peerhost();
+ &debug("Connection from $paddr",6);
# &validate_connection( $paddr ); - need to do something here...
alarm($SPONG_SERVER_ALARM) if $SPONG_SERVER_ALARM;
$header = <$client>; chomp $header;
+ &debug("msg header = $header",6);
while( defined( $line = <$client> ) ) {
last if ($cnt += length($line)) > 100000;
$message .= $line;
}
+ alarm(0);
$ok = 1;
};
- alarm(0);
undef $client;
if ( ! $ok ) {