PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > DNS-SD Gem (0.6.0) on OSX Leopard 10.5.3
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
DNS-SD Gem (0.6.0) on OSX Leopard 10.5.3

Réponse
 
LinkBack Outils de la discussion
Vieux 18/06/2008, 13h42   #1
Don Levan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut DNS-SD Gem (0.6.0) on OSX Leopard 10.5.3

[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 you might be able to render.

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

don@vanguardcs.net
(917) 842-2911
  Réponse avec citation
Vieux 18/06/2008, 16h21   #2
Don Levan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DNS-SD Gem (0.6.0) on OSX Leopard 10.5.3

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 .

Don Levan





On Jun 18, 2008, at 8:42 AM, Don Levan wrote:

> 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 you might be able to render.
>
> Don Levan, Psy. D.
> President, Vanguard Custom Software
> "We create simple applications which solve complex problems"
>
> don@vanguardcs.net
> (917) 842-2911



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h16.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10516 seconds with 10 queries