.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::Server::MultiType 3" .TH Net::Server::MultiType 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Net::Server::MultiType \- Net::Server personality .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use base qw(Net::Server::MultiType); \& \& sub process_request { \& #...code... \& } \& \& my @types = qw(PreFork Fork Single); \& \& Net::Server::MultiType\->run(server_type => \e@types); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module. .PP This personality is intended to allow for easy use of multiple Net::Server personalities. Given a list of server types, Net::Server::MultiType will require one at a time until it finds one that is installed on the system. It then adds that package to its \&\f(CW@ISA\fR, thus inheriting the methods of that personality. .SH ARGUMENTS .IX Header "ARGUMENTS" In addition to the command line arguments of the Net::Server base class, Net::Server::MultiType contains one other configurable parameter. .PP .Vb 2 \& Key Value Default \& server_type \*(Aqserver_type\*(Aq \*(AqSingle\*(Aq .Ve .IP server_type 4 .IX Item "server_type" May be called many times to build up an array or possible server_types. At execution, Net::Server::MultiType will find the first available one and then inherit the methods of that personality .SH "CONFIGURATION FILE" .IX Header "CONFIGURATION FILE" \&\f(CW\*(C`Net::Server::MultiType\*(C'\fR allows for the use of a configuration file to read in server parameters. The format of this conf file is simple key value pairs. Comments and white space are ignored. .PP .Vb 1 \& #\-\-\-\-\-\-\-\-\-\-\-\-\-\- file test.conf \-\-\-\-\-\-\-\-\-\-\-\-\-\- \& \& ### multi type info \& ### try PreFork first, then go to Single \& server_type PreFork \& server_type Single \& \& ### server information \& min_servers 20 \& max_servers 80 \& spare_servers 10 \& \& max_requests 1000 \& \& ### user and group to become \& user somebody \& group everybody \& \& ### logging ? \& log_file /var/log/server.log \& log_level 3 \& pid_file /tmp/server.pid \& \& ### access control \& allow .+\e.(net|com) \& allow domain\e.com \& deny a.+ \& \& ### background the process? \& background 1 \& \& ### ports to bind \& host 127.0.0.1 \& port localhost:20204 \& port 20205 \& \& ### reverse lookups ? \& # reverse_lookups on \& \& #\-\-\-\-\-\-\-\-\-\-\-\-\-\- file test.conf \-\-\-\-\-\-\-\-\-\-\-\-\-\- .Ve .SH "PROCESS FLOW" .IX Header "PROCESS FLOW" See Net::Server .SH HOOKS .IX Header "HOOKS" There are no additional hooks in Net::Server::MultiType. .SH "TO DO" .IX Header "TO DO" See Net::Server .SH AUTHOR .IX Header "AUTHOR" Paul T. Seamons paul@seamons.com .SH "SEE ALSO" .IX Header "SEE ALSO" Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single