Wrote base of client and server.