Henry, There are many other ways to use websockets because CF includes a fairly robust gateway service. It has been there since CF 7.
On my CF 9 server I use the product by Nate Mische that Scott indicated in his link. I added the gateway type, then added an instance. I send events to my instance from my internal tracking system where I tracked logged hours for my many consultants. Then I built a dashboard that includes realtime charting plus hours, notes and raw SVN comment updates. It gives me a living picture of what is happening in my company during the working day. Clicking on pie sections of the charts brings up additional chart data using the socket. For example, clicking on a pie segment for a client brings up daily hours burn for that client. It is much faster (generally) that an Ajax call. I use client side charting libraries called "Rgraph" for the visuals.
It looks like this.
Under the hood on the client side the code is what you would expect. Note these samples are not the full story - your implementation would be unique.
<script>
var reconnectTimer = 0;
var userID = '1';
var socketDomain = 'ws://*my system url*.com:1225';
// Firefox is a little different.
if (window.MozWebSocket) {
window.WebSocket = window.MozWebSocket;
}
...
</script>
I open a connection (conn is the var) and then there is an onMessage() function that parses out each message type (messages arive as json - but they could be any sort of string).
conn.onmessage = function (event) {
var message = event.data;
console.log(event.data);
var t = JSON.parse(event.data);
if(t.TYPE != 'Blah')
do A B or C
....
It's not so neatly packaged up as cfwebsocket, and I suspect the socket server might be fragile on a different system - say one with a very heavy load like a stock trading application. But it works well for how it is tasked. I hope this helps!
-Mark