add stop() function to websocket service