Building the websocket RX functionality