Java控制IP TTL? [英] Java control IP TTL?

查看:123
本文介绍了Java控制IP TTL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中,有没有办法控制套接字上发送的数据包的IP头的TTL?

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);

这篇关于Java控制IP TTL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆