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

net/udp: Add some embedded-nal-async UDP traits #2519

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chrysn
Copy link
Contributor

@chrysn chrysn commented Feb 2, 2024

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

…ll_ functions

This is a breaking change for users of the poll_ functions. (Some might
not notice if they already pass in an IpEndpoint into poll_send_to, or
discard that item in poll_recv_from).
chrysn added a commit to chrysn-pull-requests/RIOT-rs that referenced this pull request Apr 8, 2024
Moving the code avoids a constant whack-a-mole of updating dependency
versions, and enables review within RIOT-rs before moving it back into a
branch at embassy.

Code was moved from embassy-rs/embassy#2519, I
was the original author.
chrysn added a commit to chrysn-pull-requests/RIOT-rs that referenced this pull request Apr 12, 2024
Moving the code avoids a constant whack-a-mole of updating dependency
versions, and enables review within RIOT-rs before moving it back into a
branch at embassy.

Code was moved from embassy-rs/embassy#2519, I
was the original author.
chrysn added a commit to chrysn-pull-requests/RIOT-rs that referenced this pull request Apr 19, 2024
Moving the code avoids a constant whack-a-mole of updating dependency
versions, and enables review within RIOT-rs before moving it back into a
branch at embassy.

Code was moved from embassy-rs/embassy#2519, I
was the original author.
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.

net/UDP: Implement embedded-nal-async traits for UDP
1 participant