3 ms·
The right way for a server to do this is to listen on 0.0.0.0 and then examine the socket to see what address(es) it is listening on, and report a real address
by enneff 12y ago
The right way for a server to do this is to listen on 0.0.0.0 and then examine the socket to see what address(es) it is listening on, and report a real address to the user. It's just laziness (or ignorance) to print 0.0.0.0.
- shurcooL 12y agoYep, exactly this. I do that in a Go app that I posted in my top level comment.