The basic solution (not python specific) is to fork or create a thread for each incoming connection. Somewhere after you do the accept , create a thread and handle all communication from that connection in the thread. The server while loop would then go back to listening for connections and forking/creating threads as it needs.
|