Class MulticastSocketOptions


  • public final class MulticastSocketOptions
    extends UdpSocketOptions
    Defines socket options for multicast communication.

    Multicast socket options include the UDP socket options inherited from UdpSocketOptions, along with multicast-specific settings for time-to-live, loopback mode, and the network interface.

    Options that are not explicitly configured use the underlying socket implementation's defaults, except for reuse address, which defaults to true.

    Instances are created using the MulticastSocketOptions.Builder.

    Author:
    Charles B. Kozoyed
    See Also:
    UdpSocketOptions, MulticastClient, MulticastSocketOptions.Builder
    • Method Detail

      • getTimeToLive

        public Integer getTimeToLive()
        Returns the configured multicast time-to-live.
        Returns:
        the multicast time-to-live, or null if the underlying socket default is used
      • getLoopbackModeDisabled

        public Boolean getLoopbackModeDisabled()
        Returns whether multicast loopback mode is disabled.
        Returns:
        true if loopback mode is disabled, false if enabled, or null if the underlying socket default is used
      • getNetworkInterface

        public NetworkInterface getNetworkInterface()
        Returns the network interface used for multicast communication.
        Returns:
        the configured network interface, or null if the underlying socket default is used