Sha256: 7427496345d3badc08aadf75701543375ba5a77db8849e7e5a877c908887e83b
Contents?: true
Size: 660 Bytes
Versions: 8
Compression:
Stored size: 660 Bytes
Contents
# using the dnssd library to find running, local QLab instances require 'rubygems' require 'dnssd' Thread.abort_on_exception = true def row label, record puts "%-12s%s" % [label, record.send(label)] end browser = DNSSD.browse '_qlab._udp' do |b| DNSSD.resolve b.name, b.type, b.domain do |r| puts '*' * 40 puts "FOUND QLAB:" puts puts '-- machine --' row :name, b row :type, b row :domain, b row :interface, b puts puts '-- resolved domain --' row :target, r row :port, r row :target, r puts '*' * 40 end end trap 'INT' do browser.stop; exit end trap 'TERM' do browser.stop; exit end sleep
Version data entries
8 entries across 8 versions & 1 rubygems