instance method
Socket#ipv6only!
() -> void
ipv6only!
ext/socket/lib/socket.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ext/socket/lib/socket.rb, line 468
def ipv6only!
if defined? Socket::IPV6_V6ONLY
self.setsockopt(:IPV6, :V6ONLY, 1)
end
end
enable the socket option IPV6_V6ONLY if IPV6_V6ONLY is available.