![]() | :: | Software | :: | ucspi-ssl |
The sslhandle.c program provides a framework for compiling preforking sslserver-like servers.
Each sslhandle server accepts all sslserver options, and in addition:
-f lockfile: Lock lockfile around calls to accept.
The concurrency option (-c) sets the number of children that a sslhandle server forks upon startup. The default setting is 1. Each child process listens for requests on the socket inherited from the parent process.
If any of its child processes exits, a sslhandle server forks a new child process to replace the original. When it receives SIGTERM, a sslhandle server sends SIGTERM to each of its children, waits for them to exit, and then itself exits.
Before handling an accepted request, a sslhandle server sets certain environment variables, a la sslserver.
void server(int argc,char * const *argv)The arguments to server are the command line arguments to the sslhandle server that remain after option parsing.
The server subroutine is called within a loop, with one iteration per request. It must release any resources allocated to handle a particular request before returning to its caller.
build myserver
The ucspi-ssl package includes the example server sslperl.