Async::DNS SourceAsyncDNSEndpoint

module Endpoint

Definitions

def self.for(nameservers, port: 53, **options)

Get a list of standard nameserver connections which can be used for querying any standard servers that the system has been configured with.

Implementation

def self.for(nameservers, port: 53, **options)
	connections = []
	
	Array(nameservers).each do |host|
		connections << IO::Endpoint.udp(host, port, **options)
		connections << IO::Endpoint.tcp(host, port, **options)
	end
	
	return IO::Endpoint.composite(*connections)
end