Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listening on multiple IP addresses #7

Open
dtoubelis opened this issue May 13, 2015 · 2 comments
Open

Listening on multiple IP addresses #7

dtoubelis opened this issue May 13, 2015 · 2 comments

Comments

@dtoubelis
Copy link
Contributor

I need the server to listen on both IPv6 and IPv4 addresses. How do I do that?

@dtoubelis
Copy link
Contributor Author

I could think of few options:

  1. to have a special host name "*" that would imply listening on all available addresses (may be a bit tricky to implement as one would need to check what address types are actually available).
  2. to extend "server.addr" or add new "server.listen" option that supports a comma separated list of addresses as follows "0.0.0.0:443,[::]:8888,localhost" (if port is not specified then use "server.port" option as common default). Better, but some parsing would be required.
  3. to have ad_server_add_listen_addr(server, addr, port) method to add sockets.

My favorite is 3 but it will break backward compatibility. What do you think?

@wolkykim
Copy link
Owner

+1 on the option 2 as it doesn't ntroduce new api to remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants