1Net::Server::Fork(3)  User Contributed Perl Documentation Net::Server::Fork(3)
2
3
4

NAME

6       Net::Server::Fork - Net::Server personality
7

SYNOPSIS

9         use Net::Server::Fork;
10         @ISA = qw(Net::Server::Fork);
11
12         sub process_request {
13            #...code...
14         }
15
16         __PACKAGE__->run();
17

DESCRIPTION

19       Please read the pod on Net::Server first.  This module is a personal‐
20       ity, or extension, or sub class, of the Net::Server module.
21
22       This personality binds to one or more ports and then waits for a client
23       connection.  When a connection is received, the server forks a child.
24       The child handles the request and then closes.
25
26       With the exception of parent/child signaling, this module will work
27       (with basic functionality) on Win32 systems.
28

ARGUMENTS

30       check_for_dead
31           Number of seconds to wait before looking for dead children.  This
32           only takes place if the maximum number of child processes
33           (max_servers) has been reached.  Default is 60 seconds.
34
35       max_servers
36           The maximum number of children to fork.  The server will not accept
37           connections until there are free children. Default is 256 children.
38
39       max_dequeue
40           The maximum number of dequeue processes to start.  If a value of
41           zero or undef is given, no dequeue processes will be started.  The
42           number of running dequeue processes will be checked by the
43           check_for_dead variable.
44
45       check_for_dequeue
46           Seconds to wait before forking off a dequeue process.  It is
47           intended to use the dequeue process to take care of items such as
48           mail queues.  If a value of undef is given, no dequeue processes
49           will be started.
50

CONFIGURATION FILE

52       See Net::Server.
53

PROCESS FLOW

55       Process flow follows Net::Server until the post_accept phase.  At this
56       point a child is forked.  The parent is immediately able to wait for
57       another request.  The child handles the request and then exits.
58

HOOKS

60       The Fork server has the following hooks in addition to the hooks pro‐
61       vided by the Net::Server base class.  See Net::Server
62
63       "$self->pre_accept_hook()"
64           This hook occurs just before the accept is called.
65
66       "$self->pre_fork_hook()"
67           This hook occurs just after accept but before the fork.
68
69       "$self->post_accept_hook()"
70           This hook occurs in the child after the accept and fork.
71
72       "$self->run_dequeue()"
73           This hook only gets called in conjuction with the check_for_dequeue
74           setting.
75

TO DO

77       See Net::Server
78

AUTHOR

80       Paul Seamons <paul@seamons.com>
81
82       Rob Brown <bbb@cpan.org>
83

SEE ALSO

85       Please see also Net::Server::INET, Net::Server::PreFork,
86       Net::Server::MultiType, Net::Server::SIG Net::Server::Single
87
88
89
90perl v5.8.8                       2007-02-03              Net::Server::Fork(3)
Impressum