Method: Async::DNS::System.ipv6?

Defined in:
lib/async/dns/system.rb

.ipv6?Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
38
# File 'lib/async/dns/system.rb', line 30

def self.ipv6?
	begin
		list = Socket.ip_address_list
	rescue NotImplementedError
		return true
	end
	
	list.any? {|a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? }
end