First iteration of server and client