---- QUOTE: Anne What difference is between to use TWSocketThrdServer and use TWSocketServer with ClientThread? Which is better for me? ---- END.
TWSocketThrdServer spawns a new thread for each incoming client (or a new thread after the maximum amount of clients per threads has been reached). TWSocketServer handles all clients within the same thread in an asynchroneous, event-driven way. Both handle multiple clients at the same time, the difference is the thread model. If you use the multi-threaded version, keep in mind that development and debugging is substantially more complex because of thread-safety and synchronization issues. Also, keep in mind that spawning new threads is a resource-expensive process. Because of this, it is always recommended that you use the single-threaded approach unless you *absolutely need* to use multiple threads. As I have discovered recently on this list while discussing this topic, if you are not sure that you *absolutely need* to use multiple threads, then chances are you don't. TWSocketServer is able to handle many hundreds of concurrent clients in an efficient way, and its optimized for high-performance. However, if your clients have to do very intense or long processing with the data, this may prevent the other clients from processing data, so you may need to look into the multi-threaded approach. -dZ. -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be