Open AshishShanker opened 6 years ago
I've missed this post. Sorry for that.
Thank you so much for your feedback.
As you mentioned, this module does not work well on Windows. Unfortunately, I don't know the reason. In my environment (Windows 10), sometimes this module works well, but sometimes this module does not work well.
I updated this module today. Though the update is not for this issue, the discovery process is improved. If possible, try the latest version of this module.
It seems that the Apple Bonjour installed on Windows 10 blocks the UDP communications from this module. I uninstalled the Apple Bonjour, this module appear to work robustly at least in my environment.
I am trying to use this lib to power service discovery on a Windows 10 machine and while I am able to publish a service and see it advertised through the
dns-sd
command throughcmd
, this library's.discover()
method always returns an empty array. I am publishing a websocket service under_ws._tcp.local.
, but I tried looking forhttp
services and they don't get discovered by this lib either.Stepping through code, I do see
DnsSdComposer.compose()
return a valid buffer, andDnsSd._startListening()
returns a valid_source_address
, but whenDnsSd._startDiscovery()
sends a UDP datagram, nothing appears to happen.I am going to try and dig deeper using protocol sniffing to see what really happens to that datagram, but just wanted to see if you might have some quick pointers for me.
Note that both the DNS client and server are on the same machine. The server is deployed as a Windows service written in
node-windows
and it creates a service advertisement upon startup usingbonjour
. I have Apple Bonjour SDK for Windows installed on the machine, and I am using IPv4.