decide which websocket should be used