-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
net: net.Listen("tcp", "0.0.0.0:1234") also listens on IPv6 #17615
Comments
Please make bug reports self-contained. Don't link off to other threads for the majority of the information. For the record: Audrius Butkevicius asked:
|
/cc @rsc I think there is an implementation bug here; an IPv4 address should cause an IPv4 listener to be created, even if it's That said... I can't imagine many users actually care about listening on all v4 interfaces but not v6 interfaces. They almost certainly want |
I don't think it's a good idea to mix two issues here. I just wanted to update documentation. Can you please open a new issue for the new behavior? |
CL https://golang.org/cl/45771 mentions this issue. |
This change clarifies the documentation on Listen and ListenPacket to avoid unnecessary confusion about how the arguments for the connection setup functions are used to make connections. Also replaces "name" or "hostname" with "host name" when the term implies the use of DNS. Updates #17613. Updates #17614. Updates #17615. Fixes #17616. Updates #17738. Updates #17956. Change-Id: I0bad2e143207666f2358d397fc076548ee6c3ae9 Reviewed-on: https://go-review.googlesource.com/34876 Reviewed-by: Ian Lance Taylor <iant@golang.org>
I was asked several times on golang-nuts, golang-dev or golang-codereviews like the following:
https://groups.google.com/d/msg/golang-dev/MvAlef3CTqk/DGs5sLBcCgAJ
The text was updated successfully, but these errors were encountered: