1Net::Server::MultiType(U3s)er Contributed Perl DocumentatNieotn::Server::MultiType(3)
2
3
4

NAME

6       Net::Server::MultiType - Net::Server personality
7

SYNOPSIS

9           use base qw(Net::Server::MultiType);
10
11           sub process_request {
12               #...code...
13           }
14
15           my @types = qw(PreFork Fork Single);
16
17           Net::Server::MultiType->run(server_type => \@types);
18

DESCRIPTION

20       Please read the pod on Net::Server first.  This module is a
21       personality, or extension, or sub class, of the Net::Server module.
22
23       This personality is intended to allow for easy use of multiple
24       Net::Server personalities.  Given a list of server types,
25       Net::Server::MultiType will require one at a time until it finds one
26       that is installed on the system.  It then adds that package to its
27       @ISA, thus inheriting the methods of that personality.
28

ARGUMENTS

30       In addition to the command line arguments of the Net::Server base
31       class, Net::Server::MultiType contains one other configurable
32       parameter.
33
34           Key               Value            Default
35           server_type       'server_type'    'Single'
36
37       server_type
38           May be called many times to build up an array or possible
39           server_types.  At execution, Net::Server::MultiType will find the
40           first available one and then inherit the methods of that
41           personality
42

CONFIGURATION FILE

44       "Net::Server::MultiType" allows for the use of a configuration file to
45       read in server parameters.  The format of this conf file is simple key
46       value pairs.  Comments and white space are ignored.
47
48           #-------------- file test.conf --------------
49
50           ### multi type info
51           ### try PreFork first, then go to Single
52           server_type PreFork
53           server_type Single
54
55           ### server information
56           min_servers   20
57           max_servers   80
58           spare_servers 10
59
60           max_requests  1000
61
62           ### user and group to become
63           user        somebody
64           group       everybody
65
66           ### logging ?
67           log_file    /var/log/server.log
68           log_level   3
69           pid_file    /tmp/server.pid
70
71           ### access control
72           allow       .+\.(net|com)
73           allow       domain\.com
74           deny        a.+
75
76           ### background the process?
77           background  1
78
79           ### ports to bind
80           host        127.0.0.1
81           port        localhost:20204
82           port        20205
83
84           ### reverse lookups ?
85           # reverse_lookups on
86
87           #-------------- file test.conf --------------
88

PROCESS FLOW

90       See Net::Server
91

HOOKS

93       There are no additional hooks in Net::Server::MultiType.
94

TO DO

96       See Net::Server
97

AUTHOR

99       Paul T. Seamons paul@seamons.com
100

SEE ALSO

102       Please see also Net::Server::Fork, Net::Server::INET,
103       Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single
104
105
106
107perl v5.26.3                      2017-08-10         Net::Server::MultiType(3)
Impressum