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

Remove tcp stack #70

Merged
merged 3 commits into from Aug 3, 2022

Conversation

lulf
Copy link
Contributor

@lulf lulf commented Aug 3, 2022

Remove TcpClientStack and TcpFullStack

These traits restricts implementors to only support 1connection at a time, which only covers a small set of use cases.

The new TcpConnect trait is more flexible and should be the preferred trait for implementors and users.

NOTE:

  • UDP traits remain, I'm not sure if they should be removed or not. It is tempting to remove it so that we can start with a clean slate now before it's being relied on by too many.
  • TcpFullStack is also removed, pending TcpListen and TcpAccept traits discussed in TcpClient trait for creating shared TCP/IP stack #69.

Ulf Lilleengen added 2 commits August 3, 2022 09:33
These traits restricts implementors to only support 1
connection at a time, which only covers a small set of use cases.

The new TcpConnect trait is more flexible and should be the preferred
trait for implementors and users.
@Dirbaio
Copy link
Contributor

Dirbaio commented Aug 3, 2022

The UDP traits have the same set of problems (for example, you can only rx/tx on 1 conn at a time). I'd remove them, once they're known-broken there's no point in leaving them.

The traits restrict the implementations too much on embedded devices.
Removing them now to avoid people committing to them, and instead
reintroduce them in a form that is more easily supported by drivers.
@lulf
Copy link
Contributor Author

lulf commented Aug 3, 2022

Great, I've removed them.

@MathiasKoch I've also bumped the version to 0.2.0 and added the changelogs.

@MathiasKoch MathiasKoch merged commit f23280c into rust-embedded-community:master Aug 3, 2022
@MathiasKoch
Copy link
Collaborator

Released to crates.io 🎉

@lulf lulf deleted the remove-tcp-stack branch August 3, 2022 09:30
@Dajamante
Copy link

Dajamante commented Aug 3, 2022

Hello Ulf @lulf and everyone,
Does it mean that ConnectionSocket and ListeningSocket shall be implemented for TCPConnect?
Refering to issue #63!

@lulf
Copy link
Contributor Author

lulf commented Aug 3, 2022

Hi @Dajamante ! I think the discussion in that issue is mainly about the blocking traits. This PR only removed the async traits since I made some bad decisions in the initial design.

As discussed in #69, maybe TcpListen and TcpAccept traits is the complementary of TcpConnect, but I'm not going to work on that near term due to other priorities, so feel free to have a go :)

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.

None yet

4 participants