This Enonic XP app demonstrates the use of WebSockets through simple chat functionality. The app lets you join a chat room, and all chat messages are translated to morse code server side.
When installed, the app creates an url mapping that makes the chat available at <host>/morse-chat
on the site it's added to.