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

Support IPv6 and IPv4 dual-stack network listening #5095

Open
HaitaoDeng opened this issue Feb 6, 2024 · 3 comments
Open

Support IPv6 and IPv4 dual-stack network listening #5095

HaitaoDeng opened this issue Feb 6, 2024 · 3 comments

Comments

@HaitaoDeng
Copy link

HaitaoDeng commented Feb 6, 2024

Read me

Read this first before creating an issue:

Describe the feature

The TCPServerBase.class only support listen one SocketAddress. The service cannot support both IPv4 and IPv6 dual-stack networks.

Use cases

This will help promote the development of ipv6.

@vietj
Copy link
Member

vietj commented Feb 6, 2024

it is not cleat what you mean, a server can only indeed bind on a single local address interface, but it can be IPV4 or IPV6 depending on the configuration of the JVM, can you elaborate ?

@HaitaoDeng
Copy link
Author

HaitaoDeng commented Feb 6, 2024

it is not cleat what you mean, a server can only indeed bind on a single local address interface, but it can be IPV4 or IPV6 depending on the configuration of the JVM, can you elaborate ?

I want to bind both ipv4 and ipv6 ip addresses to a port. like this

String[] hosts = host.split(","); List<ChannelFuture> futures = new ArrayList<>(); for (String h : hosts) { ChannelFuture f = bootstrap.bind(h, port); futures.add(f); } for (ChannelFuture f : futures) { f.sync(); }

@vietj
Copy link
Member

vietj commented Feb 6, 2024

ok that does not seem specific to IPV4/IPV6 though ?

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

No branches or pull requests

2 participants