I got really interested into making an application that could accept & handle I/O out of multiple connected clients.
I've been told that I need to use two threads for this, for the performance.
Thread-1
Accepting connections
Thread-2
Handling clients I/O and response
I've took a look at what is a thread, I did use it, but I am not really sure how can I split my program (Don't have one, but just saying) into two threads.
How can I do that?
One thread of these should have it's own class? I have no idea of a good design I can apply for this so I can understand it better.
How can I do this? can you show me a little example?