This is a simple standalone HTTP server. By default, it doesn't thread or fork. It does, however, act as a simple frontend which can be used to build a standalone web-based application or turn a CGI into one.

It is possible to use Net::Server classes to create forking, pre-forking, and other types of more complicated servers; see "net_server".

When you kill -HUP the server, it lets the current request finish being processed, then uses the restart method to re-exec itself. Please note that in order to provide restart-on-SIGHUP, HTTP::Server::Simple sets a SIGHUP handler during initialisation. If your request handling code forks you need to make sure you reset this or unexpected things will happen if somebody sends a HUP to all running processes spawned by your app (e.g. by "kill -HUP <script>")

Run the server. If all goes well, this won't ever return, but it will start listening for HTTP requests. Any arguments passed to this will be passed on to the underlying Net::Server implementation, if one is used (see "net_server").

When called with an argument, sets the socket to the server to that arg.

Returns the socket to the server; you should only use this for actual socket-related calls like getsockname. If all you want is to read or write to the socket, you should use stdin_handle and stdout_handle to get the in and out filehandles explicitly.