During my presentation yesterday, a user asked about case sensitivity and WebSockets. The short answer is - they are not. Given a ColdFusion application that defines a channel called "news", you can ignore case everywhere. That includes:
- The cfwebsocket tag subscribeTo argument
- The JavaScript object's publish and getSubscriberCount methods
- Server-side functions like wsGetAllSubscribers and wsPublish
- Subchannels. You can subscribe to news.sports and then broadcast to NEWS.SPORTS and the right people get the message.
There are a few more things I could test, but I think it is pretty clear that case sensitivity is not an issue.
There is one small nitpick to this. When you define the name of the JavaScript variable in the cfwebsocket tag, that string is case-sensitive. That makes sense as JavaScript variables are case sensitivite. But it looks like all WebSocket channels are going to be case insensitive.
Archived Comments
Thanks Ray... nice presentation, easy to follow. I look forward to using WebSockets in the future. I'm a little unclear about fallback with Flash for IE and other browsers that support WebSockets... maybe a topic for a future post.
What is unclear? It just works. :)
I see... so I don't have to do anything? That's all handled by CF?
Yep. I had a demo of that - but during the preso IE launched with Flash turned off - I couldn't remember the UI to get to the plugins - and I skipped past it.
That's where I was a little confused... thanks Ray!