Java control IP TTL?

后端 未结 2 678
傲寒
傲寒 2020-12-21 05:21

In Java, is there a way to control the TTL of the IP header for packets sent on a socket?

2条回答
  •  攒了一身酷
    2020-12-21 06:08

    Apparently only on Multicast sockets, which have:

    MulticastSocket.setTimeToLive(int ttl);
    

提交回复
热议问题