Trying to learn sockets api with python.