I want to be able to create multiple threads and send data to a specific thread based on what the main program receives.
Basically I am sending a packet to a receiving program which will contain a number. This number is used to determine which thread it wants to communicate with. How can I send that packet to a thread with that same number?
Example: threads 1,2,3,4 and 5 exist. My main program receives a packet with the number 3. I want to send that packet to thread 3.
How can I achieve this?