Sha256: b6912ddcf06019a43e59bff3772cac8d2dbe90e819faff46e3ce41299aa52957

Contents?: true

Size: 322 Bytes

Versions: 12

Compression:

Stored size: 322 Bytes

Contents

require 'dnssd'

Thread.abort_on_exception = true

domains = []

enumerator = DNSSD.enumerate_domains do |reply|
  domains << reply.domain
  next if reply.flags.more_coming?

  puts "Found domains:\n#{domains.join "\n"}"
  exit
end

trap 'INT' do enumerator.stop; exit end
trap 'TERM' do enumerator.stop; exit end

sleep

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
dnssd-3.0.2 sample/enumerate_domains.rb
dnssd-3.0.1 sample/enumerate_domains.rb
dnssd-3.0.0 sample/enumerate_domains.rb
dnssd-2.0.1 sample/enumerate_domains.rb
dnssd-2.0 sample/enumerate_domains.rb
dnssd-1.4 sample/enumerate_domains.rb
dnssd-1.3.4 sample/enumerate_domains.rb
dnssd-1.3.3 sample/enumerate_domains.rb
dnssd-1.3.2 sample/enumerate_domains.rb
rackjour-0.1.8 vendor/gems/gems/dnssd-1.3.1/sample/enumerate_domains.rb
dnssd-1.3.1 sample/enumerate_domains.rb
dnssd-1.3 sample/enumerate_domains.rb