Open chrysn opened 2 years ago
The "closing" part may technically not be a regression, as the documentation says that connections are closed when the socket is dropped. This is a bit unusual for TCP connections (on which data can still be received after the sending side having closed it), but consistent with the sync/nb API (which consumes the socket on close, making further reds impossible).
With the embedded-nal-async 0.2.0 release and #70, the -async version of the traits lost feature parity with the sync/nb versions; in particular, missing points are
For closing a connection, it may make sense to replace the current AT
type Connection<'m>: embedded_io::asynch::Read<Error = Self::Error> + embedded_io::asynch::Write<Error = Self::Error> [...];
with a dedicated TcpConnection trait, which depends on Read and Write, but in addition requires implementation of a close method.