Sha256: dcd23c6180c9d2d3db5e5858ffaac660be2ee391d5687ad42f81056aafaff481
Contents?: true
Size: 591 Bytes
Versions: 9
Compression:
Stored size: 591 Bytes
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:test) task :default => :test task :console do require 'pry' require_relative 'lib/async/dns' Pry.start end task :server do require_relative 'lib/async/dns' class TestServer < Async::DNS::Server def process(name, resource_class, transaction) @resolver ||= Async::DNS::Resolver.new([[:udp, "8.8.8.8", 53], [:tcp, "8.8.8.8", 53]]) transaction.passthrough!(@resolver) end end server = TestServer.new([[:udp, '127.0.0.1', 2346]]) Async::Reactor.run do server.run end end
Version data entries
9 entries across 9 versions & 1 rubygems