net/udp: Add some embedded-nal-async UDP traits #2519
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building on smoltcp-rs/smoltcp#903, this implements some UDP traits.
It notably doesn't implement the core stack trait; as outlined in the docs, that doesn't go well with the user-allocated stack data structures. For the same problem, RIOT OS provides a Stack type that is actually kind of a
Cell<Option<Socket>>
and thus allows the creation of exactly one socket -- that is an option here. However, my test applications really already take a bound socket as an argument, so let's see how far this gets us without doing the ugly.This is a draft PR both because it has waaay too many FIXMEs / todo!()s, and because it hasn't been tested so far (but it builds, so push it :-D )
When done, this closes: #2516