exchanges messages between the server