I have a handful of async channels that I want to make available over TCP. The protocol doesn't truly matter to me, as long as its fast. I can implement my own by following Tokio's mini-redis
(they implement it), but I'm actually looking for a crate that may be able to do this for me. I imagine the perfect syntax would be along the lines of:
// Create an unbounded channel.
let r, s = async_channel::unbounded();
// Send it to the magic TCP creator
tcp_create(&r, &s, "://address").await?;
// We can still use r and s
r.send("message").await?;
// But we, as well as other programs, can communicate over TCP
let tcp_r, tcp_s = tcp_connect("://address")?;
tcp_s.recv().await?;