I was wondering, which is the best way to pass data through threads created by the TCPServer class?
1. It is ok if I make a common inherited object for all threads and each one writes data in this object and then the object sends a Notification to other so they can read it?
2. Change the TCPServer class or use the ServerReactor framework in a multithreaded way?
3 . It is possible to use Events for this job?
4. Make my custom TCPServer class and here implement a way to keep track of the threads and know who is who?
I want to use this for a server-client Chat application in which I have groups, chat rooms... Each client has his own thread. Any ideas which is the correct way to communicate between threads?