Added sample code for communicating with back-end via WebSocket