Connecting to browse result with name containing "." yields -65540
If the name of the found reply contains ".", reply.name returns the name up to the dot and no more. Trying to resolve or connect to it fails with -65540.
Not sure if I'm doing something wrong having "." in my name or if it's a bug in dnssd...
puts reply.name, reply.type, reply.domain
yields:
12 23.12 123.office.spotify.net: Spotify._nuremote._tcp.local.
(pretend that 12.23.12.123 is a valid IP)
Im not sure if I will explain this correctly…
Is the full name "12.23.12.123.office.spotify.net"?
If "12.123.12.123" is considered one part of the name the dots should be escaped like "12.123.12.123". This is how my domain showed with the old back-to-my-mac, "eric.hodel.members.mac.com"
If you don't have control over escaping the name I'll see what I can do to work around it
Sorry, this time with different escaping: 12\.123\.12\.123 and eric\.hodel.members.mac.com
I've just hit this issue too:
one_service = DNSSD::Service.new
two_service = DNSSD::Service.new
one_service.register "hereis.myservice", "_testservice._tcp", nil, 8080
two_service.browse("_testservice._tcp") { |b| puts b.inspect }
This fails with ArgumentError: could not construct full service name
The browse reply has:
@name == "hereis"
@type == "myservice._testservice"
@domain == "_tcp.local."
Subsequently passing these values to DNSSD::Service.fullname and on to DNSServiceConstructFullName fails for obvious reasons.
AFAIK the service name can legitimately contain an unescaped dot, and the set_names method on DNSSD::Reply is going to fail when it does, because it does not escape them.
I can patch and submit a PR implementing this if escaping at this stage seems correct? I've only got a passing familiarity with the code and DNSSD in general, so I might have missed something.