Bitcoin Forum

Other => Off-topic => Topic started by: aliza on November 12, 2016, 10:54:48 AM



Title: Multithreading server: one thread per client connection
Post by: aliza on November 12, 2016, 10:54:48 AM
I have multi-threading java application. I am wondering if this approach is correct. From my main method I will start two threads. One thread start listening for in coming client connections (this is a client-server application). Once a client connects (http://menhairstyle.zohosites.com/) with the server it starts a new thread to handle the client and this continues for all the client connections. The other thread started by the main program handles the messages received by the clients which are in a common buffer.

My question is: Main thread starts a thread (server), this thread in-turn starts many threads. Is this correct?