ENC424J600/src
Harry Ho 99899e6657 nal: Fix read/write not pushing erroneous socket back to the stack
* Based on quartiq's minimq as of 933687c2e4
* In minimq applications, a socket is expected to be returned when `nal::TcpStack::open()` is called
  * `MqttClient::read()`/`write()` takes away the TCP socket handle (wrapped as an `Option`) from its `RefCell`, and then calls `nal::TcpStack::read()`/`write()`; if NAL returns `nb::Error`, then the MQTT client will propagate and return the error, leaving `None` behind
  * Afterwards, when `MqttClient::socket_is_connected()` gets called (e.g. while polling the interface), it will detect that the socket handle is `None`, and attempt to call `nal::TcpStack::open()`
  * Since `open()` pops a socket from the array (`unused_handles`), when implementing this NAL the socket should have been pushed back to the stack, i.e. by `close()`; this prevents any future calls of `open()` from returning `NetworkError::NoSocket` due to emptiness of the array of socket handles
2021-03-11 17:32:44 +08:00
..
lib.rs feature: add nal support 2021-01-26 17:21:53 +08:00
nal.rs nal: Fix read/write not pushing erroneous socket back to the stack 2021-03-11 17:32:44 +08:00
rx.rs Fix controller & smoltcp device bugs 2020-12-30 17:05:39 +08:00
smoltcp_phy.rs Fix controller & smoltcp device bugs 2020-12-30 17:06:50 +08:00
spi.rs Remove cortex-m dependencies for delay (#2) 2021-01-25 12:35:23 +08:00
tx.rs Fix controller & smoltcp device bugs 2020-12-30 17:05:39 +08:00