I've found empirically that
Endpoint endpoint1 = Endpoint.create(new Ping());
endpoint1.publish("http://0.0.0.0:8080/ws/ping");
binds to all network interfaces on the current computer (instead of just localhost - 127.0.0.1 or the hostname), but I have not been able to locate the documentation which says that this is guaranteed.
Question: Where is it defined that binding to 0.0.0.0 in Java will always bind to all network interfaces?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…