So i have a simple tcp client/server setup that sends objects back and forth and it works all good.
But let's say i now want to make a call and ask the server for a special set of lets say "products" and i need to know what "answer" of the incoming messages is the one i specially asked for.
Since the loop that receives messages just checks what type they have and react to it it's hard to say "this message is the one you asked for".
Example:
- Button is clicked
- Message is send to the server
- A few other messages arrive why i wait for the answer
- The right message arrives <- How to know its the "right" one?
- Call the function that i want to
- Update something in my form
Hope it's clear what i meant.