NAME

Any::Daemon::HTTP - preforking HTTP daemon

INHERITANCE

Any::Daemon::HTTP
  is a Any::Daemon

SYNOPSIS

my $http = Any::Daemon::HTTP->new(%opts);
$http->run;

DESCRIPTION

This module extends the basic Any::Daemon with childs which handle http connections. The HTTP/1.1 protocol implementation of HTTP::Daemon is (ab)used.

Please support my development work by submitting bug-reports, patches and (if available) a donation.

See documentation in base class.

METHODS

See documentation in base class.

Constructors

See documentation in base class.

Any::Daemon::HTTP->new(OPTIONS)

See the option descriptions of Any::Daemon::new().

-Option   --Defined in     --Default
 docroot                     'http://$host'
 group      Any::Daemon      undef
 host                        <from socket>
 pid_file   Any::Daemon      undef
 server_id                   <program name>
 socket                      <created internally>
 use_ssl                     <false>
 user       Any::Daemon      undef
 workdir    Any::Daemon      current working directory
docroot => URL

The root url of this service. When SSL is used, then the url starts with https.

group => GID|GROUPNAME
host => HOSTNAME:PORT
pid_file => FILENAME
server_id => STRING
socket => SOCKET
use_ssl => BOOLEAN
user => UID|USERNAME
workdir => DIRECTORY

Accessors

See documentation in base class.

$obj->docroot()
$obj->host()
$obj->socket()
$obj->useSSL()
$obj->workdir()

See "Accessors" in Any::Daemon

Action

See documentation in base class.

$obj->run(OPTIONS)
-Option        --Defined in     --Default
 background      Any::Daemon      <true>
 child_died      Any::Daemon      spawn new childs
 child_task      Any::Daemon      <accept http connections>
 handle_request                   <required>
 kill_childs     Any::Daemon      send sigterm
 max_childs      Any::Daemon      10
 new_connection                   <undef>
 reconfigure     Any::Daemon      ignore
background => BOOLEAN
child_died => CODE
child_task => CODE
handle_request => CODE
kill_childs => CODE
max_childs => INTEGER
new_connection => CODE
reconfigure => CODE

SEE ALSO

This module is part of Any-Daemon-HTTP distribution version 0.10, built on July 09, 2013. Website: http://perl.overmeer.net/any-daemon/

LICENSE

Copyrights 2013 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html