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

Pre-filter by type and ip on discovery #33

Merged
merged 2 commits into from
Aug 17, 2021

Conversation

LeszekSwirski
Copy link
Contributor

If an IP or DeviceType is specified in the device options, use that to perform early filtering, by

  • IP: If an IP is specified, ping that IP directly instead of the UDP broadcast
  • DeviceType: Restrict the discovery network factory to only the one with the correct port

The IP one is particularly useful for networks that don't support broadcast.

Copy link
Owner

@dhleong dhleong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small nits, but otherwise looking good, thanks!

src/discovery/composite.ts Outdated Show resolved Hide resolved
src/discovery/model.ts Outdated Show resolved Hide resolved
src/discovery/udp.ts Outdated Show resolved Hide resolved
@LeszekSwirski
Copy link
Contributor Author

Nits resolved, PTAL again.

Copy link
Owner

@dhleong dhleong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@dhleong dhleong merged commit 921e84e into dhleong:main Aug 17, 2021
@dhleong
Copy link
Owner

dhleong commented Aug 17, 2021

Thanks for your contribution :)

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants