Write the client and server