-
Notifications
You must be signed in to change notification settings - Fork 818
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
base: main
Are you sure you want to change the base?
net/udp: Add some embedded-nal-async UDP traits #2519
Conversation
…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).
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.
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.
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.
Hi @chrysn, is there something specific preventing this from being merged? If so, I would love to help with that, since this is a really useful feature. |
there's a few TODOs and FIXMEs, i'd like to see them resolved before this is merged. i've rebased this into https://github.com/embassy-rs/embassy/tree/impl-embedded-nal-async-udp-v2 |
Thanks for the rebase, I'll combine that in with my pending changes. I've been testing this for the last months in a limited scope – and just found out that I completely forgot to keep this PR updated. Sorry for that; got a few urgent things for the next few days, but I expect to come back to this in the next two weeks. |
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