Added websocket helper method