Module: Async::DNS::Endpoint
- Defined in:
- lib/async/dns/endpoint.rb
Overview
DNS endpoint helpers.
Class Method Summary collapse
-
.for(nameservers, port: 53, **options) ⇒ Object
Get a list of standard nameserver connections which can be used for querying any standard servers that the system has been configured with.
Class Method Details
.for(nameservers, port: 53, **options) ⇒ Object
Get a list of standard nameserver connections which can be used for querying any standard servers that the system has been configured with.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/async/dns/endpoint.rb', line 11 def self.for(nameservers, port: 53, **) connections = [] Array(nameservers).each do |host| connections << IO::Endpoint.udp(host, port, **) connections << IO::Endpoint.tcp(host, port, **) end return IO::Endpoint.composite(*connections) end |