You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http://play.golang.org/p/yjqyCAEMyR
What is the expected output?
I expect all examples to listen on an IPv4 address. On the playground this is the case.
What do you see instead?
net.Listen("tcp", "0.0.0.0:11111") listens on [::]:11111 on my
system.
The full output is:
2014/02/25 19:59:14 0.0.0.0:11111
2014/02/25 19:59:14 [::]:11112
2014/02/25 19:59:14 127.0.0.1:11113
2014/02/25 19:59:14 127.0.0.1:11114
Which operating system are you using?
Ubuntu 12.04, 3.8.0-36-generic
Which version are you using? (run 'go version' or 'gccgo --version')
go version go1.2 linux/amd64
The only reason the examples use different ports is because the playground doesn't
Close() quickly enough for the program to succeed (it works when I Close() locally).
From testing, I don't think port number makes a difference to the behaviour.
Admittedly the workaround is trivial, but I thought this worth reporting anyway.
The text was updated successfully, but these errors were encountered:
Thanks for the report but that's intentional. In the net package, a dumb and small
bump-in-api feature translates so, because we thought that it's ridiculous we must use
IPv6 textual address representation when we want to run tcp over dual IP stack on the
passive-open side. For now any of the following enables "tcp over dual IP stack on the
passive-open side" if possible.
tcp + ":port"
tcp + "0.0.0.0:port"
tcp + "[::]:port"
The text was updated successfully, but these errors were encountered: