On 06/10/2016 02:04 AM, silvioprog wrote: > Hello, > > Please take a look at this question and the first answer: > > http://askubuntu.com/questions/399431/how-many-nginx-processes-should-there-be > > It raise a question: can I use the worker processes approach with MHD? > If I understood, it need to up two or more process, but when I try that: > "Failed to bind to port 8080: Address already in use".
You can have a parent process do the binding and then share the listen socket with child processes. Or, you can on most OSes set the binding policy to allow multiple processes to listen to the same socket. In all of these cases, you should use MHD_OPTION_LISTEN_SOCKET to pass a pre-bound socket to MHD, so that you can open, bind, set options and share the socket, instead of letting MHD open a fresh listen socket.
0xE29FC3CC.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
