Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery not working #9

Open
arys opened this issue Jun 6, 2021 · 1 comment
Open

Discovery not working #9

arys opened this issue Jun 6, 2021 · 1 comment

Comments

@arys
Copy link

arys commented Jun 6, 2021

Hello, I can't resolve any services. Can you please help me with this?
My code:

mDnsSd.discover({
  name: "_kitchen._tcp.",
}).then((device_list) => {
  console.log(device_list);
}).catch((error) => {
  console.error(error);
});

Output is empty array, but I know that service is running
Screen Shot 2021-06-06 at 13 21 26

I am using electron: 11.4.6

@beezly
Copy link

beezly commented Jan 25, 2024

You need to append local to your request. DNS-SD specifies that requests ending in .local are sent multicast to your network (and therefore all devices on the local network will receive them). Requests without .local are sent unicast, and will use your hosts resolver to lookup _kitchen._tcp., which almost certainly is not resolvable and will not be sent to a device on the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants