I am developing a server using python but the server can communicate with only one client at a time . Even if the server establish connection with more than one clients, it can't make conversation with all clients at the same time.
One client should wait until the started conversation end, which may last for several minutes. This problem would create Tremendous delay up on the client which hasn't started conversation.
So, how could I let my python server to communicate with more than one clients at the same time ?
Thank you in advance
Your server needs to be multi threaded. Basically you should have the server listening on a specific port in a loop. Whenever a client request comes in, the server should spin off a new thread to handle the client at a different port and keep listening for the other incoming connection requests.
A nice answer here: python multithreaded server
You may use Tornado. It is asynchronic multithreading web-server framework.