In Java, is there a way to control the TTL of the IP header for packets sent on a socket?
Apparently only on Multicast sockets, which have:
MulticastSocket.setTimeToLive(int ttl);
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
Java Multicast Time To Live is always 0
-Djava.net.preferIPv4Stack=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With