3 ms·
0.0.0.0 is not a valid destination ip, but it is one of common variations used when binding a listening socket to "all/any addresses", aka INADDR_ANY, or addr s
by shurcooL 12y ago
0.0.0.0 is not a valid destination ip, but it is one of common variations used when binding a listening socket to "all/any addresses", aka INADDR_ANY, or addr strings like ":8080", etc..
> Yes, I ment to navigate to 0.0.0.0 to test the jekyll generated website.
> That's where jekyll points me to (console output says
> "Server address: http://0.0.0.0:4000/" It works just fine on all browsers but
> the latest Chrome.
Yeah, that's really misleading output from jekyll.
My own tool outputs [1] something like this:
serving, available at:
http://localhost:8080/index.html
http://10.0.0.10:8080/index.html
Which are the two IPs that are reachable when I do http.ListenAndServe(":8080") in Go, and they're copy-pasteable into a browser without needing it to recognize invalid IPs.
[1] https://github.com/shurcooL/cmd/blob/8d16351d1f01caca2ac65b9c276ff4c19b27118a/gopherjs_serve_html/main.go#L31-L50 https://github.com/shurcooL/cmd/blob/8d16351d1f01caca2ac65b9...
- asdfaoeu 12y agoListening on 0.0.0.0 is different to listening on multiple IP addresses when considering pulling up new interfaces afterwards.