basic structure of the websockets communication