SYNOPSIS
Void serverLoop( Protocol proto, Int port, Int maxcon, Void(NetHandle) commfun, Void(NetHandle, Int) forkfun=forkfunDefault )ARGUMENTS
proto The protocol ( Net.Protocol(3kaya) ) to listen on
port The port to listen on
maxcon The maximum number of simultaneous connections to accept.
commfun The function that processes each new connection. The connection will be closed automatically when this function exits, so it need not.
forkfun This function is run by the old process after the new process is forked, and is given the process ID of the new process. This argument may be omitted, in which case a default function that does nothing will be used.
DESCRIPTION
This function provides a basic implementation of a forking server loop, similar in architecture to sshd.
AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others ([email protected]). For further information see http://kayalang.org/LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.