I have just learned that you can use a Thread pool for multi client TCP-connections, I have an C# application today that I like to implement this to. I have read some, for example the first answer to this question ( Best way to accept multiple tcp clients? ), but I dont really get how to make the last adjustments to work with my "needs". I have a messagehandeling function for each connection (each connection is 2 threads, one for recieving/sending messages (connection open for a long duration moste of the time) and one for doing Tasks depending on the messages (also creates answers to send back). I would now like to use the recieving method in the link below, but how can I do this with a thread pool in my example?
If anything is unclear, just ask questions!
/Nick