module RubyDNS
Nested
Definitions
Resolver = Async::DNS::Resolver
Backwards compatibility:
def self.run(*arguments, server_class: Server, **options, &block)
Run a server with the given rules.
Implementation
def self.run(*arguments, server_class: Server, **options, &block)
server = server_class.new(*arguments, **options)
if block_given?
server.instance_eval(&block)
end
return server.run
end
def self.run_server(*arguments, **options, &block)
- deprecated
Signature
- deprecated
Use
RubyDNS.run
instead.
Implementation
def self.run_server(*arguments, **options, &block)
if arguments.first.is_a?(Array)
warn "Using an array of interfaces is deprecated. Please use `Async::DNS::Endpoint` instead.", uplevel: 1
endpoints = arguments[0].map do |specification|
IO::Endpoint.public_send(*specification)
end
arguments[0] = IO::Endpoint.composite(*endpoints)
end
self.run(*arguments, **options, &block)
end