Here is all the code once more. Just 40 lines. For more information, see the SocketServer docs. Enjoy!