client and server message exchange