Skip to content Skip to sidebar Skip to footer

How Can I Make A Server Communicate With More Than 1 Client At The Same Time?

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 m

Solution 1:

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

Solution 2:

You may use Tornado. It is asynchronic multithreading web-server framework.

Post a Comment for "How Can I Make A Server Communicate With More Than 1 Client At The Same Time?"