How to structure an asynchronous client/server application using tokio?

I'm trying to write a client/server library for a small project I'm working on, but I'm not sure how to proceed. I need both the client and the server to communicate asnchronously through UDP, that is, I need both to be able to send and receive messages at any time, not just request/response. I tried a few things, some of them even worked, but I'd like to hear other people's opinions on how to do this.

2 Likes