StandardSocketOptions.IpMulticastTtl Property

Definition

The <em>time-to-live</em> for Internet Protocol (IP) multicast datagrams.

[Android.Runtime.Register("IP_MULTICAST_TTL", ApiSince=24)]
public static Java.Net.ISocketOption? IpMulticastTtl { get; }
[<Android.Runtime.Register("IP_MULTICAST_TTL", ApiSince=24)>]
static member IpMulticastTtl : Java.Net.ISocketOption

Property Value

Attributes

Remarks

The <em>time-to-live</em> for Internet Protocol (IP) multicast datagrams.

The value of this socket option is an Integer in the range 0 <= value <= 255. It is used to control the scope of multicast datagrams sent by the datagram-oriented socket. In the case of an StandardProtocolFamily#INET IPv4 socket the option is the time-to-live (TTL) on multicast datagrams sent by the socket. Datagrams with a TTL of zero are not transmitted on the network but may be delivered locally. In the case of an StandardProtocolFamily#INET6 IPv6 socket the option is the <em>hop limit</em> which is number of <em>hops</em> that the datagram can pass through before expiring on the network. For IPv6 sockets it is system dependent whether the option also sets the <em>time-to-live</em> on multicast datagrams sent to IPv4 addresses.

The initial/default value of the time-to-live setting is typically 1. An implementation allows this socket option to be set after the socket is bound. Whether the socket option can be queried or changed prior to binding the socket is system dependent.

Java documentation for java.net.StandardSocketOptions.IP_MULTICAST_TTL.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to