Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Socket::Option.ipv4_multicast_ttl

Socket::Option.ipv4_multicast_ttl(integer) => sockopt

Creates a new Socket::Option object for IP_MULTICAST_TTL.

The size is dependent on the platform.

Example
p Socket::Option.ipv4_multicast_ttl(10)
#=> #<Socket::Option: INET IP MULTICAST_TTL 10>