1Net::Server::MultiType(U3s)er Contributed Perl DocumentatNieotn::Server::MultiType(3)
2
3
4
6 Net::Server::MultiType - Net::Server personality
7
9 use Net::Server::MultiType;
10 @ISA = qw(Net::Server::MultiType);
11
12 sub process_request {
13 #...code...
14 }
15
16 my @types = qw(PreFork Fork Single);
17
18 Net::Server::MultiType->run(server_type=>\@types);
19
21 Please read the pod on Net::Server first. This module is a
22 personality, or extension, or sub class, of the Net::Server module.
23
24 This personality is intended to allow for easy use of multiple
25 Net::Server personalities. Given a list of server types,
26 Net::Server::MultiType will require one at a time until it finds one
27 that is installed on the system. It then adds that package to its
28 @ISA, thus inheriting the methods of that personality.
29
31 In addition to the command line arguments of the Net::Server base
32 class, Net::Server::MultiType contains one other configurable
33 parameter.
34
35 Key Value Default
36 server_type 'server_type' 'Single'
37
38 server_type
39 May be called many times to build up an array or possible
40 server_types. At execution, Net::Server::MultiType will find the
41 first available one and then inherit the methods of that
42 personality
43
45 "Net::Server::MultiType" allows for the use of a configuration file to
46 read in server parameters. The format of this conf file is simple key
47 value pairs. Comments and white space are ignored.
48
49 #-------------- file test.conf --------------
50
51 ### multi type info
52 ### try PreFork first, then go to Single
53 server_type PreFork
54 server_type Single
55
56 ### server information
57 min_servers 20
58 max_servers 80
59 spare_servers 10
60
61 max_requests 1000
62
63 ### user and group to become
64 user somebody
65 group everybody
66
67 ### logging ?
68 log_file /var/log/server.log
69 log_level 3
70 pid_file /tmp/server.pid
71
72 ### access control
73 allow .+\.(net|com)
74 allow domain\.com
75 deny a.+
76
77 ### background the process?
78 background 1
79
80 ### ports to bind
81 host 127.0.0.1
82 port localhost:20204
83 port 20205
84
85 ### reverse lookups ?
86 # reverse_lookups on
87
88 #-------------- file test.conf --------------
89
91 See Net::Server
92
94 There are no additional hooks in Net::Server::MultiType.
95
97 See Net::Server
98
100 Paul T. Seamons paul@seamons.com
101
103 Please see also Net::Server::Fork, Net::Server::INET,
104 Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single
105
106
107
108perl v5.12.0 2007-02-02 Net::Server::MultiType(3)