Karlson2k / libmicrohttpd

GNU libmicrohttpd repository unofficial mirror on GitHub
https://www.gnu.org/software/libmicrohttpd/
Other
97 stars 29 forks source link

support multiple MHD_OPTION_LISTEN_SOCKET / MHD_OPTION_SOCK_ADDR in daemon #30

Closed MrdUkk closed 1 month ago

MrdUkk commented 1 month ago

currently i see only single is allowed per source code. it will be less consuming resources if daemon can listen in parallel on multiple ports/interfaces/unix domain sockets...

Karlson2k commented 1 month ago

Actually, not. Right now, you can run several daemons listening on various interfaces. Idle listening daemon consumes a very small amount of resources. Most of the resources are consumed be serving connections. You would hardly notice a difference (in terms of resources) between two daemons serving 10 connections and one daemon serving 10 connections. But if you really need to use a single daemon, you can listen by your own code on any number of interfaces and then use MHD_add_connection() to serve connections in the same daemon.

Does it solve your needs?

Karlson2k commented 1 month ago

Closing as inactive.