Simple client and server in Python with non-blocking socket