rust-embedded-community / embedded-nal

An Embedded Network Abstraction Layer
Apache License 2.0
177 stars 25 forks source link

Remove tcp stack #70

Closed lulf closed 2 years ago

lulf commented 2 years ago

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:

Dirbaio commented 2 years ago

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.

lulf commented 2 years ago

Great, I've removed them.

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

MathiasKoch commented 2 years ago

Released to crates.io :tada:

Dajamante commented 2 years ago

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

lulf commented 2 years ago

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 :)