Sha256: a51e0f76f76bd5fc59878f41a9bed1c43cd8d9251a7a8113b64fc7d3c9df4e5e
Contents?: true
Size: 599 Bytes
Versions: 2
Compression:
Stored size: 599 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(listen: [[:udp, '127.0.0.1', 2346]]) Async::Reactor.run do server.run end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
async-dns-0.12.0 | Rakefile |
async-dns-0.10.0 | Rakefile |