Closed kelson42 closed 2 years ago
I'm not sure it is possible (at least with libmicrohttpd).
If you don't specify a address, we use INADDR_ANY
and this means that we listen to any/all interface. This is done by libc/kernel, not us.
I'm not sure it is possible to pass several MHD_OPTION_SOCK_ADDR
to libmicrohttpd.
It would need that libmicrohttpd listens on several socket and I doubt it does this.
Why do you want to listen on several specific addresses ?
@mgautierfr The main problem is to have a command line which does do what it should do. @juuz0 Would you be able please to (1) check if this is possible to give many addresses (2) if not possible to print an error telling that only one IP address is possible.
The main problem is to have a command line which does do what it should do.
This is not a valid requirement. If it is, I can simply answer you that it already does what it should do.
@mgautierfr NO. If you request to listen on two IPs, it should listen on two IPs, and not only on the first one (or the last one?) like today. So, either we implement it or generate a clear error if more than one --address
is used.
Would you be able please to (1) check if this is possible to give many addresses
No "out of the box" way looks possible in libmicrohttpd. We can start multiple instances of kiwix::Server
maybe?
(2) if not possible to print an error telling that only one IP address is possible.
Yes but blocked by #563. Help needed :(
If you request to listen on two IPs, it should listen on two IPs, and not only on the first one (or the last one?) like today. So, either we implement it or generate a clear error if more than one --address is used.
So now we have a requirement 😉
So as it is not possible to listen on several IPs, we should check if several --address
is used and print a error
Seems to listen only on
192.168.1.213
although it should listen on127.0.0.1
as well.But:
... works fine, it listens properly on all IPs.
To me this looks like a regresssion, but not sure.