working websocket sample