In Java, is there a way to control the TTL of the IP header for packets sent on a socket?
+1
A:
Apparently only on Multicast sockets, which have:
MulticastSocket.setTimeToLive(int ttl);
Alnitak
2008-11-13 14:13:57
+1
A:
Setting the TTL using
MulticastSocket.setTimeToLive(int ttl);
is only going to work if you have enabled the IPV4Stack as outlined by this other question
http://stackoverflow.com/questions/139909/java-multicast-time-to-live-is-always-0
-Djava.net.preferIPv4Stack=true
pfranza
2009-07-29 17:01:59