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.
Thread