Longtime network programmer here but new to Rust (I read The Book). As an exercise, I have an app server using Websockets written in NodeJS that I want to rewrite in Rust. For performance, I want to use async event handling instead of multithreading. This is simple in JavaScript/Node-- just use addEventHandler() or set e.g. onmessage. Is there anything similar available in Rust, to simply set handlers triggered by network events? I've looked a little at Tokio and async-std, but don't see anything obvious. I'm trying to avoid a complete rearchitecting of the server, but can do that if there's no other choice.
I welcome all other advice on how to approach this project too. Thanks for any tips! 😊
