Pod-Webserver
view release on metacpan or search on metacpan
lib/Pod/Webserver.pm view on Meta::CPAN
# ------------------------------------------------
sub run_daemon {
my($self, $daemon) = @_;
while( my $conn = $daemon->accept ) {
if( my $req = $conn->get_request ) {
#^^ That used to be a while(... instead of an if( ..., but the
# keepalive wasn't working so great, so let's just leave it for now.
# It's not like our server here is streaming GIFs or anything.
DEBUG and print "Answering connection at ", localtime()."\n";
$self->_serve_thing($conn, $req);
}
$conn->close;
undef($conn);
}
$self->muse("HTTP Server terminated");
return;
( run in 0.267 second using v1.01-cache-2.11-cpan-4d50c553e7e )