websocket client functional