This PR adds a Framer that uses the embedded_io_async::Write and embedded_io_async::Read traits instead of the futures::Sink and futures::Stream traits. It makes it easier to use the WebSocket with TcpStreams implementing the embedded_io_async traits, like the embassy_net::TcpSocket. The Framer is behind the embedded-io-async feature.
Tests
I added an example using the Framer with the tokio::net::TcpStream wrapped in embedded_io_adapters::FromTokio as it's pretty straight forward and demonstrates the functionality sufficiently.
Overview
This PR adds a
Framer
that uses theembedded_io_async::Write
andembedded_io_async::Read
traits instead of thefutures::Sink
andfutures::Stream
traits. It makes it easier to use theWebSocket
with TcpStreams implementing the embedded_io_async traits, like the embassy_net::TcpSocket. The Framer is behind theembedded-io-async
feature.Tests
I added an example using the Framer with the
tokio::net::TcpStream
wrapped inembedded_io_adapters::FromTokio
as it's pretty straight forward and demonstrates the functionality sufficiently.Todo