make use of select in the websocket example