DNS-SD Gem (0.6.0) on OSX Leopard 10.5.3

D

Don Levan

[Note: parts of this message were removed to make it a legal post.]

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 -B _sftp-ssh._tcp" I get the following response:

Browsing for _sftp-ssh._tcp
Timestamp A/R Flags if Domain Service
Type Instance Name
8:34:04.871 Add 3 5 local. _sftp-
ssh._tcp. DL Office Desktop
8:34:04.872 Add 3 9 local. _sftp-
ssh._tcp. DL Office Desktop
8:34:04.872 Add 3 10 local. _sftp-
ssh._tcp. DL Office Desktop
8:34:04.872 Add 3 7 local. _sftp-
ssh._tcp. DL Office Desktop
8:34:04.872 Add 2 8 local. _sftp-
ssh._tcp. DL Office Desktop


However, when I run the following I get no response back:

#!/usr/bin/env ruby -wKU


require 'rubygems'
require 'dnssd'

DNSSD.browse("_sftp-ss._tcp") do |browse_reply|
puts browse_reply
end

I am using ruby 1.8.6 on Leopard 10.5.3 with dnssd-0.6.0 (ruby and the
gem were part of the standard Leopard install). My ultimate goal will
be to browse for DNSSD services and then resolve a particular service.

Thank you in advance for any help you might be able to render.

Don Levan, Psy. D.
President, Vanguard Custom Software
"We create simple applications which solve complex problems"

(e-mail address removed)
(917) 842-2911
 
D

Don Levan

Hi All,

I was in error in my last email. In fact, DNSSD.browse is returning
the result as expect. instead, DNSSD.resolve is not returning any
response when the [ dns-sd -L "Denis's MacBook Air" _ssh._tcp local ]
command line tool returns the response as expected.

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 what my script looks like:
________

#!/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 I get in textmate:
_________

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.




Thanks again for any help.

Don Levan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top