I am having a lot of trouble figuring out how to simultaneously send and receive data between a laptop and raspberry pi. In particular, I want to send thruster commands from the laptop to the raspberry pi WHILE CONCURRENTLY send sensor data from the raspberry pi to the laptop. This is all done via an Ethernet cable. Here is a photo to show you what I mean https://i.imgur.com/wQsmsUh.png.
I understand that this needs to be "asynchronous" and to use "asyncio" or something of the like, but I do not understand how to do this. Since I have two devices (laptop and pi) talking to each other, would I want to use the client-server model? That doesn't seem to work with asynchronous communication. Would I want to have two threads on each device, one for receiving and one for sending? Wouldn't that just be having a client and a server on each device?
If anyone has any guides or examples for this, that would be great. I am really lost and most of the help I have gotten has been pretty vague (e.g. use asyncio). Thanks, and have a great day!