MulticastSocket.setTTL

MulticastSocket.setTTL

Class Overview | Class Members | This Package | All Packages

Syntax
public void setTTL( byte ttl ) throws IOException
Parameters
ttl
the time-to-live
Description
Set the default time-to-live for multicast packets sent out on this socket. The TTL sets the IP time-to-live for DatagramPackets sent to a MulticastGroup, which specifies how many "hops" that the packet will be forwarded on the network before it expires.

The ttl is an unsigned 8-bit quantity, and so must be in the range 0 < ttl <= 0xFF .