From levandon at gmail.com Wed Jun 18 11:38:40 2008 From: levandon at gmail.com (Don Levan) Date: Wed, 18 Jun 2008 11:38:40 -0400 Subject: [dnssd-developers] Cross Post: DNS-SD Resolving using Gem (0.6.0) on OSX Leopard 10.5.3 Message-ID: <2CC0704A-971E-4356-9C06-132F126C728B@gmail.com> Hi All, I am attempting to use the DNS-SD gem to return information about bonjour on Leopard. When I use the command line tool with the command [ dns-sd -L "Denis's MacBook Air" _ssh._tcp local ], the response is as I would expect. However, when I do the same thing in a ruby script there is no rsponse. Here is the commandline response: _____ Don-Levan-x-392:~ donl$ dns-sd -L "Denis's MacBook Air" _ssh._tcp local Lookup Denis's MacBook Air._ssh._tcp.local 11:04:13.345 Denis's\032MacBook\032Air._ssh._tcp.local. can be reached at Deniss-MacBook-Air.local.:22 Here is my script: ________ #!/usr/bin/env ruby -wKU require 'rubygems' require 'dnssd' class DNSResolver def resolve puts "resolving" resolver = DNSSD.resolve("Denis's MacBook Air", "_ssh._tcp", "local") do |resolve_reply| puts "Resolve Result: #{resolve_reply.inspect}" end puts "Resolver Started" sleep 30 resolver.stop puts "Resolver Stopped" end end resolve_reply = DNSResolver.new.resolve _____ This is the response from Textmate's Rubymate: _________ RubyMate r8136 running Ruby r1.8.6 (/System/Library/Frameworks/ Ruby.framework/Versions/1.8/usr/bin/ruby) >>> dnssdbrowse.rb resolving Resolver Started Resolver Stopped Program exited. Thank you for any help you might be able to render. Don Levan New York