Adding Threading to a Server
It's better to make your server multi-threaded.
There should be a loop which continually accepts new connections.
Rather than handling the connection directly the Socket should be passed to a Thread object that handles the connection.