Full threadprotecto·LWIP [1] could be used for this. You'd just need to implement I/O.[1]: https://www.nongnu.org/lwip/View on HN