diff --git a/doc/scsh-manual/network.tex b/doc/scsh-manual/network.tex index edf6a5f..f576ec4 100644 --- a/doc/scsh-manual/network.tex +++ b/doc/scsh-manual/network.tex @@ -65,6 +65,15 @@ This procedure does not return, but loops indefinitely accepting connections from client programs. \end{desc} +\defun {bind-prepare-listen-accept-loop} {protocol-family prepare proc arg} {does-not-return} +\begin{desc} + Same as \ex{bind-listen-accept-loop} but runs the thunk + \var{prepare} after binding the address and before entering the + loop. The typical task of the \var{prepare} procedure is to change + the user id from the superuser to some unprivileged id once the + address has been bound. +\end{desc} + \section{Sockets} \defun {create-socket} {protocol-family type [protocol]} {socket}