A simple example on socket programming in Python. Sever can handle multiple connections a time by creating new thread.
How to run the code.
Start the server file by command
$python connectSever.py
Open 2 or more terminal windowS to run client file with command
$telnet localhost 8888
Type messages in different windows, you can see sever has multiple connection and also handles replying messages