NAME

Curse::Server::Daemon - Simple HTTP Server

SYNOPSIS

use Curse::Daemon;

my $daemon = Curse::Daemon->new;
$daemon->port(8080);
$daemon->run;

DESCRIPTION

Curse::Server::Daemon is a simple and portable async io based HTTP server.

ATTRIBUTES

Curse::Server::Daemon inherits all attributes from Curse::Server and implements the following new ones.

keep_alive_timeout

my $keep_alive_timeout = $daemon->keep_alive_timeout;
$daemon                = $daemon->keep_alive_timeout(15);

listen_queue_size

my $listen_queue_size = $daemon->listen_queue_zise;
$daemon               = $daemon->listen_queue_zise(128);

max_clients

my $max_clients = $daemon->max_clients;
$daemon         = $daemon->max_clients(1000);

max_keep_alive_requests

my $max_keep_alive_requests = $daemon->max_keep_alive_requests;
$daemon                     = $daemon->max_keep_alive_requests(100);

port

my $port = $daemon->port;
$daemon  = $daemon->port(3000);

METHODS

Curse::Server::Daemon inherits all methods from Curse::Server and implements the following new ones.

accept_lock

my $locked = $daemon->accept_lock;
my $locked = $daemon->accept_lock(1);

accept_unlock

$daemon->accept_unlock;

listen

$daemon->listen;

run

$daemon->run;

spin

$daemon->spin;