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

broker trait #160

Open
jordens opened this issue Jul 8, 2024 · 3 comments
Open

broker trait #160

jordens opened this issue Jul 8, 2024 · 3 comments

Comments

@jordens
Copy link
Member

jordens commented Jul 8, 2024

could this be simplified to an enum Broker { Ip, Named } instead of having the trait and type param propagation through the stack?

The two issues are:

  • the resolver type/Dns trait: where the stack may or may not provide the trait. maybe that could be made fallible/late fallible. Or we could always require Dns.
  • the name String size: maybe not so critical.
@jordens
Copy link
Member Author

jordens commented Jul 8, 2024

Low priority. Can't see good solutions currently, the network stack being so "local".
I do think a fallible and thus optional resolver might be worth it though. Same as standard OS networking stacks that look the same whether they can resolve or not.

@ryan-summers
Copy link
Member

  • the resolver type/Dns trait: where the stack may or may not provide the trait. maybe that could be made fallible/late fallible. Or we could always require Dns.

Given that Dns is a principle function of a network stack, it almost feels like the Dns trait should be provided for all the embedded-nal traits as some kind of base trait. There could easily be a default implementation that returns Err() if DNS is not supported, and then stack implementers could override that if their stack does support DNS.

@jordens
Copy link
Member Author

jordens commented Jul 24, 2024

Sounds good. Since lookups are already fallible they can just be perma-fallible when there is no DNS support.

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