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

[nrf noup] Allow selecting DNS-SD implementation at runtime #359

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

Damian-Nordic
Copy link
Contributor

Add Resolver::SetInstance() and ServiceAdvertiser::SetInstance() methods for dynamically changing the system-wide DNS-SD implementation used by Matter.

Also, allow for building "minimal" and "platform" DNS-SD implementations together.

NOTE: The first commit has already been reviewed in the upstream (which doesn't mean you can't double-check it ;))

…solverProxy

The relationship between Resolver and Resolver Proxy is
unclear as both classes depend on each other and Resolver
Proxy is implemented in a source file of concrete Resolver
implementation. This makes it impossible to build Matter
library with several Resolver implementations and select
one to be used at runtime.

The main reason for introducing Resolver Proxy was the need
for running multiple parallel DNS-SD queries. Address this
by adding Discovery Delegate parameter to the Resolver
interface methods for starting and stopping the discovery.

Then implement Resolver Proxy as a convenience class on top
of the Resolver interface. Additionally, simplify the
Commissionable Node Controller class by injecting a test
Resolver into Resolver Proxy.
Add Resolver::SetInstance() and ServiceAdvertiser::SetInstance()
methods for dynamically changing the system-wide DNS-SD
implementation used by Matter.

Also, allow for building "minimal" and "platform" DNS-SD
implementations together.
Copy link
Contributor

@markaj-nordic markaj-nordic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! I have only left some questions just to clarify things.

src/lib/dnssd/Discovery_ImplPlatform.cpp Show resolved Hide resolved
src/lib/dnssd/ResolverProxy.cpp Show resolved Hide resolved
@Damian-Nordic Damian-Nordic merged commit 791f8cc into nrfconnect:master Dec 5, 2023
8 checks passed
@Damian-Nordic Damian-Nordic deleted the thread_and_wifi_dns branch December 5, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants