Collect data through a websocket server.