Closed watson closed 9 years ago
i'm ignorant. whats the difference?
@mafintosh ANY
is not a normal record type like A
, SRV
etc - it's only used when querying and functions as a wildcard question.
I would normally query for an A
record to get only the ipv4 for the given hostname, eg mdns.query('brunhilde.local', 'A')
. But if I want to get all records for a given hostname I can issue an ANY
query which basically means that mDNS servers should respond with all the records they have for the given hostname (be it A
, AAAA
, SRV
, PTR
etc).
Ah okay. Yea guess it makes sense then but we should document any records as supported then (and this would be a major bump)
I'm not sure if this will require the module to officially support all record types. Just returning a response of type x isn't the same as adding query support for type x, right?
Today I can write mdns.query('brunhilde.local', 'ANY')
and the module sends the correct query and hence responds with the expected responses as far as I can see - though maybe that's just a coincidence?
Today
A
is the default query type, e.g.mdns.query('foo')
is equivalent tomdns.query('foo', 'A')
. Wouldn't it make more sense thatANY
was the default?I'll happily make a PR if this is the case :smiley: