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

Reintroduce UDP traits for async #71

Closed
chrysn opened this issue Aug 15, 2022 · 0 comments · Fixed by #73
Closed

Reintroduce UDP traits for async #71

chrysn opened this issue Aug 15, 2022 · 0 comments · Fixed by #73
Labels

Comments

@chrysn
Copy link
Contributor

chrysn commented Aug 15, 2022

The UDP traits were removed from the embedded-nal-async were scrapped in #70; so far, only the client-side TCP connections were re-introduced in a socket oriented fashion.

Please update this issue when starting work on UDP sockets; I have some ideas for doing that but no time yet -- creating this issue to ensure we don't all start off simultaneously.

[edit: Writing up traits now, will send a pinging update once there is a branch]

@eldruin eldruin added the async label Aug 15, 2022
chrysn added a commit to chrysn-pull-requests/embedded-nal that referenced this issue Aug 15, 2022
chrysn added a commit to chrysn-pull-requests/embedded-nal that referenced this issue Oct 1, 2022
chrysn added a commit to chrysn-pull-requests/embedded-nal that referenced this issue Oct 1, 2022
eldruin pushed a commit that referenced this issue Jan 17, 2023
* gitignore: Also ignore target inside nested crate

* async: Add UDP traits

Closes: #71

* async UDP: Simplify to 2 rather than 3 traits

* async UDP: Documentation fixes; receive_into consistency

One trait's receive_into still used the old receive name.

* async UDP: Make accessible through lib.rs

* async UDP: Fix lifetimes of send and receive functions

Elided lifetimes would have asked too little of the data / buffer
references.

* async UDP: Better names for bound sockets

* UDP: use async-fn-in-trait instead of associated types that are Future

This removes the lifetimes from the Connect associated types; leaving
them would cause errors (possibly related to [12681]), but I think that
stacks whose sockets are not 'static can work around this by
implementing the stack traits on a &'short stack instead.

[12681]: rust-lang/rust#102681

* async/UDP: Remove connect_default helper

The connect method can now be provided properly.

* async/CHANGELOG: Add UDP

* async/UDP: rustfmt

* async/UDP: Tie socket's error types to stack's
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants