Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net-server(1) [osx man page]

NET-SERVER(1)						User Contributed Perl Documentation					     NET-SERVER(1)

net-server - Base Net::Server starting module SYNOPSIS
net-server [base type] [net server arguments] net-server PreFork ipv '*' net-server HTTP net-server HTTP app foo.cgi net-server HTTP app foo.cgi app /=bar.cgi net-server HTTP port 8080 port 8443/ssl ipv '*' server_type PreFork --SSL_key_file=my.key --SSL_cert_file=my.crt access_log_file STDERR DESCRIPTION
The net-server program gives a simple way to test out code and try port connection parameters. Though the running server can be robust enough for full tim use, it is anticipated that this binary will just be used for basic testing of net-server ports, acting as a simple echo server, or for running development scripts as CGI. OPTIONS
"base type" The very first argument may be a Net::Server flavor. This is given as shorthand for writing out server_type "ServerFlavor". Additionally, this allows types such as HTTP and PSGI, which are not true Net::Server base types, to subclass other server types via an additional server_type argument. net-server PreFork net-server HTTP # becomes a HTTP server in the Fork flavor net-server HTTP server_type PreFork # preforking HTTP server "port" Port to bind upon. Default is 80 if running a HTTP server as root, 8080 if running a HTTP server as non-root, or 20203 otherwise. Multiple value can be given for binding to multiple ports. All of the methods for specifying port attributes enumerated in Net::Server and Net::Server::Proto are available here. net-server port 20201 net-server port 20202 net-server port 20203/IPv6 "host" Host to bind to. Default is *. Will bind to an IPv4 socket if an IPv4 address is given. Will bind to an IPv6 socket if an IPv6 address is given (requires installation of IO::Socket::INET6). If a hostname is given and "ipv" is still set to 4, an IPv4 socket will be created. If a hostname is given and "ipv" is set to 6, an IPv6 socket will be created. If a hostname is given and "ipv" is set to * (default), a lookup will be performed and any available IPv4 or IPv6 addresses will be bound. The "ipv" parameter can be set directly, or passed along in the port, or additionally can be passed as part of the hostname. net-server host localhost net-server host localhost/IPv4 There are many more options available. Please see the Net::Server documentation. AUTHOR
Paul Seamons <paul at> LICENSE
This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License perl v5.16.2 2012-06-12 NET-SERVER(1)

Check Out this Related Man Page

Net::Server::MultiType(3)				User Contributed Perl Documentation				 Net::Server::MultiType(3)

Net::Server::MultiType - Net::Server personality SYNOPSIS
use base qw(Net::Server::MultiType); sub process_request { #...code... } my @types = qw(PreFork Fork Single); Net::Server::MultiType->run(server_type => @types); DESCRIPTION
Please read the pod on Net::Server first. This module is a personality, or extension, or sub class, of the Net::Server module. 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 @ISA, thus inheriting the methods of that personality. ARGUMENTS
In addition to the command line arguments of the Net::Server base class, Net::Server::MultiType contains one other configurable parameter. Key Value Default server_type 'server_type' 'Single' 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 CONFIGURATION FILE
"Net::Server::MultiType" 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. #-------------- 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/ ### access control allow .+.(net|com) allow deny a.+ ### background the process? background 1 ### ports to bind host port localhost:20204 port 20205 ### reverse lookups ? # reverse_lookups on #-------------- file test.conf -------------- PROCESS FLOW
See Net::Server HOOKS
There are no additional hooks in Net::Server::MultiType. TO DO
See Net::Server AUTHOR
Paul T. Seamons SEE ALSO
Please see also Net::Server::Fork, Net::Server::INET, Net::Server::PreFork, Net::Server::MultiType, Net::Server::Single perl v5.18.2 2012-06-05 Net::Server::MultiType(3)
Man Page