I was just coming back to say that I had found that and it seems to be working fine. I feel more confident in that choice now that you’ve highlighted it too
It didn’t show up in my original more naive search so hopefully this question will be easier to find for others like me in the future.
Ah, actually I ended up converting the socket2 SockAddr to Tokio’s TcpSocket. When you call connect on that, it returns a TcpStream.
I originally tried converting between the streams but the connect function in socket2, while being non blocking, doesn’t use Tokio to manage it, so I started looking deeper.
That’s when I found TcpSocket::from_std_stream(). With that I can set up why I need and then use connect on TcpSocket which uses Tokio directly